Tuning decision tree hyperparameters
In machine learning, parameters are adjusted when the model is being tuned. The weights in linear and Logistic Regression, for example, are parameters adjusted during the build phase to minimize errors. Hyperparameters, by contrast, are chosen in advance of the build phase. If no hyperparameters are selected, default values are used.
Decision Tree regressor
The best way to learn about hyperparameters is through experimentation. Although there are theories behind the range of hyperparameters chosen, results trump theory. Different datasets see improvements with different hyperparameter values.
Before selecting hyperparameters, let's start by finding a baseline score using a
cross_val_score with the following steps:
'bike_rentals_cleaned'dataset and split it into
X_bikes(predictor columns) and