来自Orange docs(http://docs.orange.biolab.si/reference/rst/Orange.classification.logreg.html)我试图复制这部分代码的结果:
导入橙色
titanic = Orange.data.Table(" titanic") lr = Orange.classification.logreg.LogRegLearner(titanic)
正确= 0.0 对于泰坦尼克号: 如果lr(ex)== ex.getclass(): 正确+ = 1 打印"分类准确度:",正确/ len(泰坦尼克号) Orange.classification.logreg.dump(LR)
因此我只得到"分类准确度"仅此而已。我想要得到的是回归系数,但调用Orange.classification.logreg.dump(lr)什么都不返回。
谢谢,彼得
答案 0 :(得分:0)
使用print Orange.classification.logreg.dump(lr)
打印出模型(之后修复了Orange文档中的示例代码)。
请注意,您可以在lr.beta
中获取系数。