To study the influence of a single (hyper-)parameter, I use validation_curve:

grid_result = grid_obj.fit(X_train1, y_train1)
grid_best = grid_result.best_estimator_
train_score, val_score = validation_curve(grid_best 
                                          , X_train1 
                                          , y_train1
                                          , param_name = 'learning_rate'
                                          , param_range = param_range 
                                          , cv=5
                                          , scoring="neg_mean_squared_error" 
                                          , verbose = 1

But param_name can hold only a single variable. Thus, though when e.g. already performing a hyperparameter search through gridsearchcv or something similar, I have to fit/CV all single parameters in validation_curve again. There is probably a smarter way, or?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.