14.7 Selecting Important Features in Random Forests
# 筛选重要特征from sklearn.ensemble import RandomForestClassifier
from sklearn import datasets
from sklearn.feature_selection import SelectFromModel
iris = datasets.load_iris()
features = iris.data
target =
通过阈值筛选随机森林的重要特征14.7 Selecting Important Features in Random Forests# 筛选重要特征from sklearn.ensemble import RandomForestClassifierfrom sklearn import datasetsfrom sklearn.feature_selection import Sele...