scores=[]
for model_name,mp in model_param.items():
model_selction=GridSearchCV(estimator=mp['model'],param_grid=mp['model'],cv=5,return_train_score=False)
model_selction.fit(X,y)
scores.append({
'model':model_name,
'best_score':model_selction.best_score_,
'best_params':model_selction.best_param_
})
Asked
Active
Viewed 612 times
0

StupidWolf
- 45,075
- 17
- 40
- 72
-
can you explain where the error occurs instead of dumping the code – StupidWolf Dec 03 '21 at 08:35
-
I suspect you did not call the method, see https://stackoverflow.com/questions/46001292/what-is-the-difference-between-calling-function-with-parentheses-and-without-in – StupidWolf Dec 03 '21 at 08:35