Purpose: Despite the potential of machine learning models, the lack of generalizability has hindered their widespread adoption in clinical practice. We investigate three methodological pitfalls: (1) violation of independence assumption, (2) model evaluation with an inappropriate performance indicator or baseline for comparison, and (3) batch effect. Materials and Methods: Using several retrospective datasets, we implement machine learning models with and without the pitfalls to quantitatively illustrate these pitfalls' effect on model generalizability. Results: Violation of independence assumption, more specifically, applying oversampling, feature selection, and data augmentation before splitting data into train, validation, and test sets, respectively, led to misleading and superficial gains in F1 scores of 71.2% in predicting local recurrence and 5.0% in predicting 3-year overall survival in head and neck cancer as well as 46.0% in distinguishing histopathological patterns in lung cancer. Further, randomly distributing data points for a subject across training, validation, and test sets led to a 21.8% superficial increase in F1 score. Also, we showed the importance of the choice of performance measures and baseline for comparison. In the presence of batch effect, a model built for pneumonia detection led to F1 score of 98.7%. However, when the same model was applied to a new dataset of normal patients, it only correctly classified 3.86% of the samples. Conclusions: These methodological pitfalls cannot be captured using internal model evaluation, and the inaccurate predictions made by such models may lead to wrong conclusions and interpretations. Therefore, understanding and avoiding these pitfalls is necessary for developing generalizable models.
翻译:尽管机器学习模型具有潜力,但缺乏通用性妨碍了临床实践的广泛采用。我们调查了三个方法缺陷:(1) 违反独立假设,(2) 模型评价,不适当的业绩指标或基准进行比较,(3) 批量效应。 材料和方法:使用若干追溯性数据集,我们采用机器学习模型,无论在数量上如何错误地说明这些缺陷对模型普遍性的影响。结果:违反独立假设,更具体地说,在将数据分为火车、验证和测试组之前,采用过度抽样、特征选择和数据增加,导致F1分数的误导性和表面收益,在预测当地复发和颈癌总体存活率方面达到71.2%的F1分,在预测3年全面存活率方面达到5.0%,在区分肺癌的病理模式方面达到46.0%。此外,随机地分配一个主题在培训、验证和测试组别中的数据点导致F1分差数增加21.8%。此外,我们展示了选择绩效措施和基线以进行比较的重要性。 在出现批次效果时,在预测局部复发性肿瘤和预估结果时,这种正常的模型只能得出98%的推算。