Hyperparameter tuning selects model-training settings by comparing candidate configurations. A poor choice can hurt performance, so each candidate is evaluated with cross-validation and the configuration with the lowest error is chosen. section 8.1.3
A practical tuning workflow is:
- Specify candidate hyperparameter sets, such as different k values for k-nearest neighbors or regularization settings for linear regression. section 8.1.3
- Run cross-validation for every candidate and compare its error. section 8.1.3
- Choose the lowest-error configuration, train the model with it, and use that model for prediction. section 8.1.3
- Within cross-fitted DML, tune separately on each training fold before predicting on the held-out fold; repeat after switching fold roles. section 8.1.3
Tuning an ATE analysis
For the right-heart catheterization dataset, estimate the average treatment effect and its confidence interval with DoubleML, using hyperparameter tuning with tune_on_folds=True. section 8.3.1

















