“…21 A limitation of machine learning is, however, that algorithms may perform well in the sample they were trained on but rarely generalize to new data. 22,23 To address this, previous studies have applied within-sample cross-validation (CV), in which a given sample is iteratively divided into training and test data to ensure that model training and testing are conducted on different datasets. 18,24 While reducing the likelihood of overfitting, this approach leaves unaddressed the question whether the algorithm indeed generalizes to new and unseen data from independently recruited participants, 25 which is considered the gold standard of evaluating machine-learning performance.…”