使用決策樹進行病人用藥分
本程式放置於Google Colab,共用連結如下:https://colab.research.google.com/drive/1TIscq-E4JQNTlD9Ln0vW3ddyqv-yKxsY?usp=sharing
Step1)匯入資料與分析資料
Step2)資料的前處理
Step3)分割訓練資料與測試資料
Step4)使用決策樹進行分類
Step5)調整決策樹的max_leaf_nodes找出最高正確率
Step6)繪製決策樹
本程式放置於Google Colab,共用連結如下:https://colab.research.google.com/drive/1TIscq-E4JQNTlD9Ln0vW3ddyqv-yKxsY?usp=sharing
Step1)匯入資料與分析資料
Step2)資料的前處理
Step3)分割訓練資料與測試資料
Step4)使用決策樹進行分類
Step5)調整決策樹的max_leaf_nodes找出最高正確率
Step6)繪製決策樹