📅  最后修改于: 2022-03-11 14:58:48.079000             🧑  作者: Mango
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
X, y = make_classification(
n_samples=1000, n_features=10, n_informative=3, n_redundant=0,
n_repeated=0, n_classes=2, random_state=0, shuffle=False)
X_train, X_test, y_train, y_test = train_test_split(
X, y, stratify=y, random_state=42)