You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
These are the RMSE values generated when I did a cross validation before:
rmse_svd = []
for k in [4,6,9,11,14,18,29]:
_svd = SVD(n_factors = k)
#Using cross validate to compute the error value for each fold
#["test_rmse"] is a numpy array with min accuracy value for each testset
loss_svd = cross_validate(_svd, _data, measures=['rmse'], cv=5, verbose=False)["test_rmse"].mean()
rmse_svd.append(loss_svd)
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:No matter the hyper parameter values, It always returns the first value as the best choice.
The text was updated successfully, but these errors were encountered: