GridSearchCV always recommends the first parameter combination as best
Author: n-srinidhiCreated Feb 27, 2023Updated Feb 27, 2023
Hi!I am trying to use GridSearchCV to estimate the best combination of parameter values. I am trying to use simple SVD, with a single parameter n_factors like this:
param_grid = {'n_factors': [4,6,9,11,14,18,29]}
gs = GridSearchCV(SVD, param_grid, measures=['rmse'], cv=5)
gs.fit(_data)
# best RMSE score
print(gs.best_score['rmse'])
# combination of parameters that gave the best RMSE score
print(gs.best_params['rmse'])No matter the hyper parameter values, It always returns the first value as the best choice.
Source: NicolasHug/Surprise