LECT17 - Bagging reduces the average variance

LECT17 - Bagging reduces the average variance

di DAVIDE VEZZARO -
Numero di risposte: 0

In this notebook, I'll use http://rasbt.github.io/mlxtend/ which is a library that contains a plenty of useful ML functions.

In this case, I will use bias_variance_decomp() function to calculate the bias variance decomposition in order to show that an ensemble of Decision Tree predictors aims to decrease the variance value of the model.

The documentation of this specific function http://rasbt.github.io/mlxtend/user_guide/evaluate/bias_variance_decomp/ is well written and helps to delve deeper into the topic understanding how values are computed. It also remembers the importance of bias and variance tradeoff to avoid overfitting and underfitting.

Below there will be a comparison among results of a Decision Tree Classifier, a Bagging Classifier of DTs and a Random Forest Classifier which derives from the Bagging approach.

Notebook: https://colab.research.google.com/drive/1Z23Xl-C4jApmqSKxNgW_Qm-0_Pp4xWLO?usp=sharing

Dataset: https://www.kaggle.com/datasets/elakiricoder/gender-classification-dataset?resource=download