FB貼文預測
第一組
109502535 資工3A 湯騏蔚
Goal
Data Set
規格 - feature & target
爬蟲 - Python Selenium
最後成功爬下1081則貼文
資料處理
由data_process這個function來負責整個資料前處理的部分
資料處理
Model Training
建Decision Tree
由build_tree這個function來負責,包含pre pruning跟post pruning以及print出結果
直接使用sklearn的DecisionTreeClassifier
畫ROC curve
簡單的在plot_roc這個function裡面,用sklearn的predict_proba、roc_curve、auc、RocCurveDisplay,再加上matplotlib,畫出ROC curve,並且存成roc curve.png
Demo
Conclusion
成果不如預期,可能原因: