Seleção de modelos: modelos de ensemble

Praticando perguntas de entrevista de Machine Learning em Python

Lisa Stuart

Data Scientist

Bootstrapping

Bootstrapping

1 https://medium.com/@rrfd/boosting-bagging-and-stacking-ensemble-methods-with-sklearn-and-mlens-a455c0c982de
Praticando perguntas de entrevista de Machine Learning em Python

Random forest

Floresta

1 https://www.sca.com/en/about-us/our-forest/
Praticando perguntas de entrevista de Machine Learning em Python

Gradient Boosting

Gradient boosting

1 https://blog.bigml.com/2017/03/14/introduction-to-boosted-trees/
Praticando perguntas de entrevista de Machine Learning em Python

RF vs GB

parameter Random Forest Gradient Boosting
n_estimators 10 100
criterion gini (or entropy) friedman_mse
max_depth None 3
learning_rate N/A 0.1
1 https://scikit-learn.org/stable/modules/classes.html#module-sklearn.ensemble
Praticando perguntas de entrevista de Machine Learning em Python

Functions

Function returns
sklearn.ensemble.RandomForestClassifier Random Forest
sklearn.ensemble.GradientBoostingClassifier Gradient Boosted Model
sklearn.metrics.accuracy_score trained model accuracy
sklearn.metrics.confusion_matrix(y_test,y_pred) confusion matrix
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 score
Praticando perguntas de entrevista de Machine Learning em Python

Vamos praticar!

Praticando perguntas de entrevista de Machine Learning em Python

Preparing Video For Download...