簡體   English   中英

如何在不使用 function train_test_split 的情況下將數據拆分為測試和訓練?

[英]How can I split the data into test and train without using function train_test_split?

我目前正在進行時間序列預測,我必須將數據分成訓練集和測試集。 (讓前 70% 的數據在訓練集中)

但是,我不能使用 train_test_split function 因為它會洗牌。 我還能如何拆分數據

您實際上可以使用 train_test_split,但設置shuffle = False

https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM