划分训练集验证集

train_test_split 直接划分

StratifiedShuffleSplit 根据y标签分类划分

sk-learn中StratifiedShuffleSplit()函数 实现对数据集的划分_liguandong-CSDN博客_stratifiedshufflesplit

交叉验证

cross_val_score

3.1. Cross-validation: evaluating estimator performance — scikit-learn 1.0.1 documentation

scoreing 的选择

3.3. Metrics and scoring: quantifying the quality of predictions — scikit-learn 1.0.1 documentation