# Tuning

Tuning: Hyperparameters: Settings You Choose, Searching for Good Settings.

Updated: November 19, 2026

1. [Hyperparameters: Settings You Choose](https://www.ask-codey.com/lessons/ml-hyperparameters) (Journeyman): A hyperparameter is a setting you choose before fit, such as a tree's max_depth, while fit learns the rest, such as the tree's questions; get_params and set_params read and change the settings, the defaults are only a starting point, and settings are chosen with cross-validation on the training rows, never with the test set.
2. [Searching for Good Settings](https://www.ask-codey.com/lessons/ml-grid-search) (Freelancer): GridSearchCV tries every combination of the settings you list, scores each by cross-validation on the training rows, keeps the best in best_params\_ and best_score\_ with every result in cv_results\_, and refits the best pipeline on all the training rows, ready for one final test score; a pipeline's settings are named step\_\_setting, and RandomizedSearchCV tries a sample when the grid is too big.

Source: https://www.ask-codey.com/courses/machine-learning-python/topics/ml-tuning
