Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Extract the best model from gridsearch cv

# Extract the best model and evaluate it on the test set
best_model = grid_model_result.best_estimator_
print("Accuracy of logistic regression classifier: ", best_model.score(X_test,y_test))
Source by projects.datacamp.com #
 
PREVIOUS NEXT
Tagged: #Extract #model #gridsearch #cv
ADD COMMENT
Topic
Name
1+9 =