What is Stacking of Models in Machine Learning?

The last Ensemble method we will discuss in this series is called stacking (short for stacked generalization). It is based on a simple idea: instead of using trivial functions (such as hard voting) to aggregate the predictions of all predictors in an ensemble, why don’t we train a model to perform this aggregation? Figure below … Read more

Introduction to Dimensionality Reduction

The text discusses the curse of dimensionality in machine learning, highlighting challenges in high-dimensional spaces. It suggests reducing features to improve training efficiency and visualization, while addressing potential information loss and risks of overfitting with increased dimensions. Dimensionality reduction techniques will be explored further.

Random Forests | Machine Learning from Scratch

As we have discussed, a Random Forest is an ensemble of Decision Trees, generally trained via the bagging method (or sometimes pasting), typically with max_samples set to the size of the training set. Instead of building a BaggingClassifier and passing it a DecisionTreeClassifier, you can instead use the RandomForestClassifier class, which is more convenient and … Read more

Gini Impurity or Entropy? How to decide the root node in decision tree?

By default, the Gini impurity measure is used, but you can select the entropy impurity measure instead by setting the criterion hyperparameter to “entropy”. The concept of entropy originated in thermodynamics as a measure of molecular disorder: entropy approaches zero when molecules are still and well ordered. It later spread to a wide variety of … Read more

Decision Trees | Machine Learning from Scratch

Like SVMs, Decision Trees are versatile Machine Learning algorithms that can perform both classification and regression tasks, and even multioutput tasks. They are very powerful algorithms, capable of fitting complex datasets. For example, you trained a DecisionTreeRegressor model on the California housing dataset, fitting it perfectly (actually overfitting it).Decision Trees are also the fundamental components … Read more