joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\externals\loky\process_executor.py", line 490, in _process_worker
r = call_item()
^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\externals\loky\process_executor.py", line 291, in __call__
return self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 606, in __call__
return [func(*args, **kwargs) for func, args, kwargs in self.items]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 606, in <listcomp>
return [func(*args, **kwargs) for func, args, kwargs in self.items]
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\utils\parallel.py", line 139, in __call__
return self.function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\model_selection\_validation.py", line 866, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\base.py", line 1382, in wrapper
estimator._validate_params()
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\base.py", line 436, in _validate_params
validate_parameter_constraints(
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\utils\_param_validation.py", line 98, in validate_parameter_constraints
raise InvalidParameterError(
sklearn.utils._param_validation.InvalidParameterError: The 'criterion' parameter of RandomForestRegressor must be a str among {'poisson', 'friedman_mse', 'squared_error', 'absolute_error'}. Got 'mae' instead.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\python\电力负荷预测.py", line 69, in <module>
random_search.fit(X_train, y_train)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\base.py", line 1389, in wrapper
return fit_method(estimator, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\model_selection\_search.py", line 1024, in fit
self._run_search(evaluate_candidates)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\model_selection\_search.py", line 1951, in _run_search
evaluate_candidates(
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\model_selection\_search.py", line 970, in evaluate_candidates
out = parallel(
^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\sklearn\utils\parallel.py", line 77, in __call__
return super().__call__(iterable_with_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 2071, in __call__
return output if self.return_generator else list(output)
^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 1681, in _get_outputs
yield from self._retrieve()
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 1783, in _retrieve
self._raise_error_fast()
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 1858, in _raise_error_fast
error_job.get_result(self.timeout)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 757, in get_result
return self._return_or_raise()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\joblib\parallel.py", line 772, in _return_or_raise
raise self._result
sklearn.utils._param_validation.InvalidParameterError: The 'criterion' parameter of RandomForestRegressor must be a str among {'poisson', 'friedman_mse', 'squared_error', 'absolute_error'}. Got 'mae' instead.
最新发布