Python FCQU功能选择

2024-09-27 18:06:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我想使用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}$

Tags: 模块fromhttpsimportgithubcomgetsklearn

热门问题