来自橙色文档(http://docs.orange.biolab.si/reference/rst/Orange.classification.logreg.html)我正在尝试复制这部分代码的结果:
进口橙
泰坦尼克号 = Orange.data.Table("泰坦尼克号") lr = Orange.classification.logreg.LogRegLearner(泰坦尼克号)
计算分类精度
正确 = 0.0 for ex in titanic: if lr(ex) == ex.getclass(): correct += 1 print "Classification accuracy:", correct / len(titanic) Orange.classification.logreg.dump(lr)
结果我只得到“分类准确性”,仅此而已。我想要得到的是回归系数,但调用 Orange.classification.logreg.dump(lr) 什么也没返回。
谢谢,彼得