-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
[LightGBM] [Warning] Using self-defined objective function
Traceback (most recent call last):
File "D:\Conda\anzhuang\lib\site-packages\bayes_opt\target_space.py", line 191, in probe
target = self._cache[_hashable(x)]
KeyError: (0.4224347626508457,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\During_DR\PYradar\1_paper\git_bys.py", line 118, in
LGB_BO.maximize(init_points=2, n_iter=2)
File "D:\Conda\anzhuang\lib\site-packages\bayes_opt\bayesian_optimization.py", line 185, in maximize
self.probe(x_probe, lazy=False)
File "D:\Conda\anzhuang\lib\site-packages\bayes_opt\bayesian_optimization.py", line 116, in probe
self._space.probe(params)
File "D:\Conda\anzhuang\lib\site-packages\bayes_opt\target_space.py", line 194, in probe
target = self.target_func(**params)
File "E:\During_DR\PYradar\1_paper\git_bys.py", line 110, in LGB_CV
return -MSE(pf, PF)
File "D:\Conda\anzhuang\lib\site-packages\sklearn\utils\validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "D:\Conda\anzhuang\lib\site-packages\sklearn\metrics_regression.py", line 335, in mean_squared_error
y_type, y_true, y_pred, multioutput = _check_reg_targets(
File "D:\Conda\anzhuang\lib\site-packages\sklearn\metrics_regression.py", line 88, in _check_reg_targets
check_consistent_length(y_true, y_pred)
File "D:\Conda\anzhuang\lib\site-packages\sklearn\utils\validation.py", line 316, in check_consistent_length
lengths = [_num_samples(X) for X in arrays if X is not None]
File "D:\Conda\anzhuang\lib\site-packages\sklearn\utils\validation.py", line 316, in
lengths = [_num_samples(X) for X in arrays if X is not None]
File "D:\Conda\anzhuang\lib\site-packages\sklearn\utils\validation.py", line 259, in _num_samples
raise TypeError("Singleton array %r cannot be considered"
TypeError: Singleton array 0.15225424981522542 cannot be considered a valid collection.