从Orange docs(http://docs.orange.biolab.si/reference/rst/Orange.classification.logreg.html)中,我试图复制这部分代码的结果:
进口橙
泰坦尼克号=橙色.data.Table(“泰坦尼克号”) lr=橙色.classification.logreg.LogRegLearner(泰坦尼克号)
正确=0.0 对于泰坦尼克号中的ex: 如果lr(ex)==例如getclass(): 正确+=1 打印“分类精度:”,正确/长度(泰坦尼克号) 橙色.classification.logreg.卸载(lr)
结果我只得到了“分类准确度”,什么都没有。我想得到的是回归系数,但是橙色.classification.logreg.dump(lr)不返回任何内容。在
谢谢,彼得
使用
print Orange.classification.logreg.dump(lr)
打印出模型(Orange文档中的示例代码已经修复)。在注意,您可以得到
lr.beta
中的系数。在相关问题 更多 >
编程相关推荐