モデル選択:アンサンブル学習

Pythonで学ぶMachine Learning面接対策

Lisa Stuart

Data Scientist

ブートストラップ

ブートストラップ

1 https://medium.com/@rrfd/boosting-bagging-and-stacking-ensemble-methods-with-sklearn-and-mlens-a455c0c982de
Pythonで学ぶMachine Learning面接対策

ランダムフォレスト

森林

1 https://www.sca.com/en/about-us/our-forest/
Pythonで学ぶMachine Learning面接対策

勾配ブースティング

勾配ブースティング

1 https://blog.bigml.com/2017/03/14/introduction-to-boosted-trees/
Pythonで学ぶMachine Learning面接対策

RF と GB の比較

パラメータ ランダムフォレスト 勾配ブースティング
n_estimators 10 100
criterion gini(またはentropy friedman_mse
max_depth None 3
learning_rate 該当なし 0.1
1 https://scikit-learn.org/stable/modules/classes.html#module-sklearn.ensemble
Pythonで学ぶMachine Learning面接対策

関数

関数 戻り値
sklearn.ensemble.RandomForestClassifier ランダムフォレスト
sklearn.ensemble.GradientBoostingClassifier 勾配ブースティングモデル
sklearn.metrics.accuracy_score 学習済みモデルの正解率
sklearn.metrics.confusion_matrix(y_test,y_pred) 混同行列
sklearn.metrics.precision_score(y_test,y_pred) 適合率(precision)
sklearn.metrics.recall_score(y_test,y_pred) 再現率(recall)
sklearn.metrics.f1_score(y_test,y_pred) F1 スコア
Pythonで学ぶMachine Learning面接対策

練習しましょう!

Pythonで学ぶMachine Learning面接対策

Preparing Video For Download...