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
.
Este ejercicio forma parte del curso
Practicing Machine Learning Interview Questions in Python
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Import
from sklearn.ensemble import ____
from sklearn.____ import ____, ____, ____, ____, _____
# Instantiate
rf_model = ____(____=____, random_state=123, oob_score = True)