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

Gradient Boosting in Machine Learning

Another very popular Boosting algorithm is Gradient Boosting. Just like AdaBoost,Gradient Boosting works by sequentially adding predictors to an ensemble, each one correcting its predecessor. However, instead of tweaking the instance weights at every iteration like AdaBoost does, this method tries to fit the new predictor to the residual errors made by the previous predictor. … Read more

Boosting( Ensemble) Trees | Machine Learning from Scratch

Introduction Boosting (originally called hypothesis boosting) refers to any Ensemble method that can combine several weak learners into a strong learner. The general idea of most boosting methods is to train predictors sequentially, each trying to correct its predecessor. There are many boosting methods available, but by far the most popular are AdaBoost13 (short for … Read more

What is Bagging and Pasting? Machine Learning from Scratch

Introduction One way to get a diverse set of classifiers is to use very different training algorithms, as just discussed. Another approach is to use the same training algorithm for every predictor, but to train them on different random subsets of the training set. When sampling is performed with replacement, this method is called bagging … Read more

What is Ensemble Learning? | Machine Learning from Scratch

Introduction: Welcome to our comprehensive tutorial on Ensemble Learning! In this guide, we’ll delve into the fascinating world of Ensemble methods, exploring how they harness the collective intelligence of multiple models to achieve superior performance in machine learning tasks. Whether you’re a seasoned practitioner or just stepping into the realm of machine learning, understanding Ensemble … Read more

Decision Tree Regression | Machine Learning from Scratch

Decision Trees are also capable of performing regression tasks. Let’s build a regression tree using Scikit-Learn’s DecisionTreeRegressor class, training it on a noisy quadratic dataset with max_depth=2: from sklearn.tree import DecisionTreeRegressor tree_reg = DecisionTreeRegressor(max_depth=2) tree_reg.fit(X, y) The resulting tree is represented below This tree looks very similar to the classification tree you built earlier. The … 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

ROC and AUC in Evaluating Classification Models

In the dynamic world of business, where data-driven decisions reign supreme, the accuracy and reliability of classification models play a pivotal role. Whether you’re involved in lead scoring or any other binary classification system, understanding the intricacies of evaluation metrics is key. Among these, the ROC (Receiver Operating Characteristic) curve and its integral companion, AUC … Read more

Information Gain in Machine Learning

Information Gain

Information Gain (IG) is critical in machine learning and decision tree algorithms, particularly in data classification and 𝐟𝐞𝐚𝐭𝐮𝐫𝐞 𝐬𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧. Information Gain Information Gain is a concept used in the field of machine learning and decision trees to measure the effectiveness of an attribute in classifying a dataset. It is commonly employed in the construction of … Read more

Learning Curves | Machine Learning from Scratch

bias-and-variance.

Till now, We have read about Gradient Descent,Min-Batch Gradient Descent,Stochastic Gradient Descent and other type of Gradient Descents and Polynomial Regression. In this post we will learn about Learning Curves in Machine Learning . Introduction Learning curves are graphical representations of how a model’s performance changes over time as it learns from training data. These … Read more