我正在尝试实现贝叶斯优化,但在从 skopt 导入 gp_minimize 的 scikit-optimize 包中导入“gp_minimize”时已经开始出错
`
res = gp_minimize(f, # the function to minimize
[(-2.0, 2.0)], # the bounds on each dimension of x
acq_func="EI", # the acquisition function
n_calls=15, # the number of evaluations of f
n_random_starts=5, # the number of random initialization points
noise=0.1**2, # the noise level (optional)
random_state=1234) # the random seed*
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-13-8761d45476ed> in <module>
----> 1 from skopt import gp_minimize
2
3 res = gp_minimize(f, # the function to minimize
4 [(-2.0, 2.0)], # the bounds on each dimension of x
5 acq_func="EI", # the acquisition function
~\Anaconda3\lib\site-packages\skopt\__init__.py in <module>
50 from . import benchmarks
51 from . import callbacks
---> 52 from . import learning
53 from . import optimizer
54
~\Anaconda3\lib\site-packages\skopt\learning\__init__.py in <module>
4 from .forest import ExtraTreesRegressor
5 from .gaussian_process import GaussianProcessRegressor
----> 6 from .gbrt import GradientBoostingQuantileRegressor
7
8
~\Anaconda3\lib\site-packages\skopt\learning\gbrt.py in <module>
5 from sklearn.ensemble import GradientBoostingRegressor
6 from sklearn.utils import check_random_state
----> 7 from sklearn.externals.joblib import Parallel, delayed
8
9
ModuleNotFoundError: No module named 'sklearn.externals.joblib'
` 我已经下载了所有必需的包,例如 joblib 和 scikit learn 和 scikit optimize,所以不知道为什么它不起作用。