Skip to main content

Section 9.16 πŸ’‘ Reproducibility Tip:

When evaluating predictive models, results can change depending on how the data are split into training and testing sets. To make your results reproducible, always control randomness and clearly document your modeling choices.
Using set.seed() (like in the reproducibility tip found in SectionΒ 5.15) ensures that the same observations are assigned to the training and test sets each time the code is run. In addition, choices such as the train/test split ratio and classification threshold (e.g., 0.5) should be explicitly stated, as they directly affect model performance.
Predictive results are only reproducible when both the code and the evaluation decisions are transparent.