from sklearn.model_selection import GridSearchCV
parameters = {'fit_intercept':('True', 'False'), 'normalize':('True', 'False'), 'copy_X':('True', 'False')}
clf3 = GridSearchCV(reg, parameters)
clf3.fit(X, y)
我得到所有参数排列的相同值:
clf3.grid_scores_
[mean: -1.57573, std: 3.02988, params: {'normalize': 'True', 'copy_X': 'True', 'fit_intercept': 'True'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'False', 'copy_X': 'True', 'fit_intercept': 'True'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'True', 'copy_X': 'True', 'fit_intercept': 'False'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'False', 'copy_X': 'True', 'fit_intercept': 'False'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'True', 'copy_X': 'False', 'fit_intercept': 'True'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'False', 'copy_X': 'False', 'fit_intercept': 'True'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'True', 'copy_X': 'False', 'fit_intercept': 'False'},
mean: -1.57573, std: 3.02988, params: {'normalize': 'False', 'copy_X': 'False', 'fit_intercept': 'False'}]
谁能告诉我我做错了什么?
TIA