Project Workshop: Model Comparison & Tuning
Now that we have a baseline score from our Logistic Regression model, let's see if we can do better by trying different models and tuning their hyperparameters!
We will test a few different algorithms to see which performs best on our specific dataset. We'll try:
To ensure our results are robust and we aren't just getting "lucky" with our train/test split, we will use 5-fold cross-validation to evaluate each model.
Let's tune a Random Forest model using Grid Search.
RandomForestClassifier.n_estimators of 50 and 100, and max_depth of 5 and None.GridSearchCV to find the best combination of parameters using 5-fold cross-validation.best_params_ and the best_score_. Does it beat your baseline?