March 2019
Beginner to intermediate
464 pages
10h 57m
English
With the data that we have prepared so far, we are going to build a predictive model, using a random forest algorithm, which predicts whether a customer is going to respond or engage with the marketing campaign. In Python's scikit-learn package, the random forest algorithm is implemented in the ensemble module and you can import the random forest class using the following code:
from sklearn.ensemble import RandomForestClassifier
You can create a random forest classifier using the following code:
rf_model = RandomForestClassifier()
However, there are many hyperparameters you can tune for random forest models. Hyperparameters are the parameters you define before you train a machine learning model. For example, in the ...
Read now
Unlock full access