我试图从包高斯过程回归器中获取属性“ 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 _