Coding Challenge: Train Random Forest Model
Train a random forest regression model on the automobile dataset.
We'll cover the following
Problem statement
In this challenge, we’ll train a random forest regression model on the automobile dataset. First, we need to load the dataset to a variable named data
. Second, we have to initialize the PyCaret environment based on the aforementioned dataset, and set the target
variable as price
. Furthermore, the initialized environment will be assigned to a variable named reg1
. We should also set the silent
parameter to True
to prevent any prompts from stopping code execution. Finally, we need to create a random forest model and assign it to a variable named model
.
Expected output
Get hands-on with 1200+ tech skills courses.