我想使用github的FCBF技术https://github.com/shiralkarprashant/FCBF 我面临的问题是,我正在研究python3ad,该模块是为python2用户实现的。我得到了以下错误,它描述了名称'xrange'没有被定义,因为我在python3上工作 我想通过改变射程来解决这个问题
from FCBF_module import FCBF, FCBFK, FCBFiP, get_i
from sklearn.datasets import load_digits
from sklearn.tree import DecisionTreeClassifier
from sklearn.linear_model import LogisticRegression
import time
from sklearn.grid_search import GridSearchCV
classifiers = [('DecisionTree', DecisionTreeClassifier(), {'max_depth' : [5, 10, 15]}),
('LogisticRegression', LogisticRegression(), {'C' : [0.1, 1, 10]})]
n_features = dataCAD.shape[1]
npieces = get_i(n_features)
模块代码只包含一个xrange事件,我尝试按范围更改它,但它不能解决问题:
^{pr2}$
尝试使用2to3包for python自动转换文件。为我工作!在
https://docs.python.org/2/library/2to3.html
相关问题 更多 >
编程相关推荐