我正试图安装一个任意的森林树模型,但我却继续把一种错误推为一种错误,即我CV的探测器被叫作空,而情况并非如此。
下面是密码和错误。
%%time
rf_val.fit(X_train, y_train)
Fitting 0 folds for each of 32 candidates, totalling 0 fits
[Parallel(n_jobs=-1)]: Using backend LokyBackend with 2 concurrent workers.
[Parallel(n_jobs=-1)]: Done 0 out of 0 | elapsed: 0.0s finished
ValueError Traceback (most recent call last)
<timed eval> in <module>
/opt/conda/lib/python3.7/site-packages/sklearn/model_selection/_search.py in fit(self, X, y, groups, **fit_params)
708 return results
709
--> 710 self._run_search(evaluate_candidates)
711
712 # For multi-metric evaluation, store the best_index_, best_params_ and
/opt/conda/lib/python3.7/site-packages/sklearn/model_selection/_search.py in _run_search(self, evaluate_candidates)
1149 def _run_search(self, evaluate_candidates):
1150 """Search all candidates in param_grid"""
-> 1151 evaluate_candidates(ParameterGrid(self.param_grid))
1152
1153
/opt/conda/lib/python3.7/site-packages/sklearn/model_selection/_search.py in evaluate_candidates(candidate_params)
690
691 if len(out) < 1:
--> 692 raise ValueError( No fits were performed.
693 Was the CV iterator empty?
694 Were there no candidates? )
ValueError: No fits were performed. Was the CV iterator empty? Were there no candidates?
我正试图调整和适应随机的森林模式,并期望它能够及时完成,但我遇到了这一错误,我可以 which。