随机森林特征重要性在列表中途显示所有零的变量

时间:2019-10-18 08:49:18

标签: scikit-learn random-forest

我使用以下代码对具有10000行和约700个变量的某些数据运行了随机森林回归器

X_train, X_test, y_train, y_test = train_test_split(features, labels, test_size = 0.25, random_state = 42)
model = RandomForestRegressor(n_estimators = 1000, max_depth=20)
model.fit(X_train, y_train[:,0])

我的一个变量包含全零,但是当我查看有序列表时,它却显示了一半。

model.feature_importances_

与其他非静态列相比,随机森林如何使用每个数据点包含零的列?

0 个答案:

没有答案