Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sf = FS.Select(Sequence = False, Random = True, Cross = True) #14

Open
onthehilluu opened this issue Feb 26, 2019 · 0 comments
Open

sf = FS.Select(Sequence = False, Random = True, Cross = True) #14

onthehilluu opened this issue Feb 26, 2019 · 0 comments

Comments

@onthehilluu
Copy link

If setting Cross=True, an error occurs when testing examples.


AttributeError Traceback (most recent call last)
in
66 sf.clf = lgbm.LGBMRegressor(random_state=1, num_leaves =6, n_estimators=1000, max_depth=3, learning_rate = 0.2, n_jobs=8) #设定回归模型
67 sf.SetLogFile('record.log') #初始化日志文件
---> 68 sf.run(validate) #输入检验函数并开始运行
69
70

~/anaconda2/envs/mypython3/lib/python3.6/site-packages/MLFeatureSelection/sequence_selection.py in run(self, validate)
488 SampleMode = self._samplemode
489 )
--> 490 best_feature_comb = a.select()
491 #best_feature_comb = a._bestfeature
492 with open(self._logfile, 'a') as f:

~/anaconda2/envs/mypython3/lib/python3.6/site-packages/MLFeatureSelection/sequence_selection.py in select(self)
112 # only if the small cycle cross can construct better features,
113 # then start next small round, otherwise, go to medium cycle
--> 114 self._CrossTermSearch(self._bestfeature, self._bestfeature)
115 n = 0
116 if self._greedyscore == self._score:

~/anaconda2/envs/mypython3/lib/python3.6/site-packages/MLFeatureSelection/sequence_selection.py in _CrossTermSearch(self, col1, col2)
270 for c1 in col1:
271 for c2 in col2[::-1]:
--> 272 for oper in self._CrossMethod.keys():
273 print('{}/{}'.format(crosscount, len(self._CrossMethod.keys()) * len(col1) * len(col2[::-1])))
274 crosscount += 1

AttributeError: 'int' object has no attribute 'keys'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant