Sélection de modèles : modèles d'ensemble

S'exercer aux questions d'entrevue en Machine Learning avec Python

Lisa Stuart

Data Scientist

Bootstrap

Rééchantillonnage bootstrap

1 https://medium.com/@rrfd/boosting-bagging-and-stacking-ensemble-methods-with-sklearn-and-mlens-a455c0c982de
S'exercer aux questions d'entrevue en Machine Learning avec Python

Forêt aléatoire

Forêt

1 https://www.sca.com/en/about-us/our-forest/
S'exercer aux questions d'entrevue en Machine Learning avec Python

Gradient Boosting

Gradient boosting

1 https://blog.bigml.com/2017/03/14/introduction-to-boosted-trees/
S'exercer aux questions d'entrevue en Machine Learning avec Python

RF vs GB

paramètre Forêt aléatoire Gradient Boosting
n_estimators 10 100
criterion gini (ou entropy) friedman_mse
max_depth None 3
learning_rate S. O. 0.1
1 https://scikit-learn.org/stable/modules/classes.html#module-sklearn.ensemble
S'exercer aux questions d'entrevue en Machine Learning avec Python

Fonctions

Fonction renvoie
sklearn.ensemble.RandomForestClassifier Forêt aléatoire
sklearn.ensemble.GradientBoostingClassifier Modèle à Gradient Boosting
sklearn.metrics.accuracy_score exactitude du modèle entraîné
sklearn.metrics.confusion_matrix(y_test,y_pred) matrice de confusion
sklearn.metrics.precision_score(y_test,y_pred) précision
sklearn.metrics.recall_score(y_test,y_pred) rappel
sklearn.metrics.f1_score(y_test,y_pred) score f1
S'exercer aux questions d'entrevue en Machine Learning avec Python

Passons à la pratique !

S'exercer aux questions d'entrevue en Machine Learning avec Python

Preparing Video For Download...