[英]How can I split the data into test and train without using function train_test_split?
i am currently working on timeseries forecasting, and I have to split the data into a training set and a test set.我目前正在进行时间序列预测,我必须将数据分成训练集和测试集。 (Have the first 70% of the data be in the training set) (让前 70% 的数据在训练集中)
However, i cannot use the train_test_split function because it will shuffle the rows.但是,我不能使用 train_test_split function 因为它会洗牌。 How else I can split the data我还能如何拆分数据
You can actually use train_test_split, but setting shuffle = False
您实际上可以使用 train_test_split,但设置shuffle = False
https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.