📜  scikit learn 拆分数据集 site:stackoverflow.com - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:14.878000             🧑  作者: Mango

代码示例1
train_pct_index = int(0.8 * len(X))
X_train, X_test = X[:train_pct_index], X[train_pct_index:]
y_train, y_test = y[:train_pct_index], y[train_pct_index:]