logo
Loading...

使用boston資料集,利用RandomForestClassifier模型預測為什麼只有找到4個Feature importance? - Cupoy

你好, 我以 boston 數據來做分析, 但是為什麼 boston 的feature name 總...

ml100-2,ml100-2-d44

使用boston資料集,利用RandomForestClassifier模型預測為什麼只有找到4個Feature importance?

2019/06/02 下午 02:19
機器學習共學討論版
莊欽智
觀看數:26
回答數:2
收藏數:0
ml100-2
ml100-2-d44

你好, 我以 boston 數據來做分析, 但是為什麼 boston 的feature name 總共有 13個, 但是 RandomForestClassifier 出來的 feature_importance_ 卻只有四個數字, 這樣是對應到哪些 feature ? 謝謝


回答列表

  • 2019/06/02 下午 02:42
    Ken Hu
    贊同數:0
    不贊同數:0
    留言數:1

    同學好:


    我用RandomForestRegressor針對Boston資料集做回歸預測

    print feature_importance_會顯示完整的13個feature重要性哦

    或許你要再檢查一下程式的上下文

  • 2019/06/03 下午 02:29
    Jimmy
    贊同數:0
    不贊同數:0
    留言數:0

    Hi 欽智!


    如同上面同學所說的,這是個回歸問題,應該要使用 RandomForestRegressor 的模型喔!