如何从高斯过程回归中获得属性“ alpha”?

时间:2019-05-19 17:23:06

标签: scikit-learn

我试图从包高斯过程回归器中获取属性“ alpha_”。但是我收到了这个错误“'GridSearchCV'对象没有属性'alpha_'”。 如何正确获取此属性?

from sklearn.model_selection import GridSearchCV
from sklearn.gaussian_process import GaussianProcessRegresso
param_grid2 = {"alpha": np.logspace(-5, 5, 15)}
kernel = Y_average**2*RBF(length_scale=1)
estimator = GridSearchCV(GaussianProcessRegressor(kernel=kernel), cv=6,
         param_grid=param_grid2)
estimator.fit(X_train, Y_train)

print estimator.alpha _

0 个答案:

没有答案