sklearn.model_selection.
train_test_split
(* arrays,** options )[资源]
将数组或矩阵拆分为随机训练和测试子集
快速实用程序,用于包装输入验证和应用程序,以将输入数据打包 到一个调用中,以在oneliner中拆分(以及可选地对子采样)数据。next(ShuffleSplit().split(X, y))
官网地址:
https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html