March 2019
Beginner to intermediate
464 pages
10h 57m
English
We are almost ready to start building and training machine learning models to predict customer responses or engagements. There is one thing we need to do before we start training a random forest model. We need to split the sample set, the encodedDF variable, into two subsets—one for training the models and another for testing and evaluating the trained models. The caTools R package has a handy function that splits a given sample set into train and test sets. If you do not have this library installed in your R environment, you can install it using the following command:
install.packages('caTools')
Now, take a look at the following code on how to split the sample set into training and testing:
library(caTools)sample ...
Read now
Unlock full access