August 2025
Beginner
236 pages
7h 51m
English
|
18 |
In the previous chapter we built our first supervised learning model. We now want to improve its prediction accuracy with future data and reduce the effects of overfitting. A good starting point is to modify the model’s hyperparameters. Holding the other hyperparameters constant, let’s begin by adjusting the maximum depth from “30” to “5.” The model now generates the following results:
Training Set Mean Absolute Error: 134918.47
Although the mean absolute error of the training set is now higher, this helps to reduce the issue of overfitting and should improve the model’s performance. Another step to optimize the model is to add more trees. If we set n_estimators to 250, we now see these results from the ...
Read now
Unlock full access