0

来自橙色文档(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) 什么也没返回。

谢谢,彼得

4

1 回答 1

0

用于print Orange.classification.logreg.dump(lr)打印模型(Orange 文档中的示例代码已被修复)。

请注意,您可以获得 中的系数lr.beta

于 2014-11-11T10:01:27.903 回答