機能の重要性を抽出するためのfeature_importances_Application

コードに直接移動してください!

# 在训练集上训练一个监督学习模型
model = AdaBoostClassifier(base_estimator=DecisionTreeClassifier(max_depth=3),n_estimators=8)
model.fit(X_train,y_train)

# 提取特征重要性
importances = model.feature_importances_

# 绘图
vs.feature_plot(importances, X_train, y_train)

AdaBoostやRandomForestなどのモデルには、主に機能の重要性をランク付けする「feature_importance_」の属性があります。

おすすめ

転載: blog.csdn.net/weixin_45281949/article/details/102809122