Session Ready
Exercise

Random forest ensemble

Questions about ensemble models are common in a machine learning interview. If you're provided with a dataset and asked to build a highly accurate model, you will likely want to consider these more complex models.

Your challenge in the remainder of this last lesson in the course is to create and compare two different ensemble models for loan_data.

In this exercise, you will create a Random Forest Classifier model and compare its performance metrics to the model in the next exercise.

The data has already been split is available in your workspace as X_train, X_test, y_train, and y_test.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Import the modules to create a Random Forest model and create a confusion matrix, accuracy, precision, recall, and F1-scores.
  • Instantiate a RF classifier and set the appropriate argument to generate 50 estimators.