📜  sklearn 随机森林特征重要性 - 任何代码示例

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

代码示例6
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)