CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Practicing Machine Learning Interview Questions in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Import
from sklearn.ensemble import ____
from sklearn.____ import ____, ____, ____, ____, _____

# Instantiate
rf_model = ____(____=____, random_state=123, oob_score = True)
Modifier et exécuter le code