我可以导入Orange但是当我尝试运行以下内容时:
import Orange as o
import numpy as np
auc_array = np.asarray(auction[nf])
auc = o.data.Table(auc_array)
imputer = o.feature.imputation.ModelConstructor()
imputer.learner_continuous = imputer.learner_discrete = Orange.classification.tree.TreeLearner(min_subset=20)
imputer = imputer(auc)
print(auc)
我明白了:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-1b6636bf45a4> in <module>()
4 auc_array = np.asarray(auction[nf])
5 auc = o.data.Table(auc_array)
----> 6 imputer = o.feature.imputation.ModelConstructor()
7 imputer.learner_continuous = imputer.learner_discrete = Orange.classification.tree.TreeLearner(min_subset=20)
8 imputer = imputer(auc)
AttributeError: module 'Orange' has no attribute 'feature'
我也尝试导入Orange.feature,但代码仍无效:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-23-78641fe044ef> in <module>()
1 import Orange as o
----> 2 import Orange.feature
3 import numpy as np
4
5 auc_array = np.asarray(auction[nf])
ImportError: No module named 'Orange.feature'