Articles → MACHINE LEARNING → Gini Index In Machine Learning

Gini Index In Machine Learning






Purpose





Example Dataset


IDOutlookTemperatureHumidityWindyPlay Tennis
1SunnyHotHighFalseNo
2SunnyHotHighTrueNo
3OvercastHotHighFalseYes
4RainMildHighFalseYes
5RainCoolNormalFalseYes
6RainCoolNormalTrueNo
7OvercastCoolNormalTrueYes
8SunnyMildHighFalseNo





Purpose Of Calculating The Parent Gini Index





Formula




Picture showing the formula for calculating the Parent Gini Index


ParameterDescription
DThe dataset of the node.
CThe number of distinct values in the dependent variable.
PiThe number of instances (rows) of a particular class value in the target (dependent) variable.




Picture showing the formula of calculating Pi



How To Calculate Parent Gini Index?




Picture showing the actual calculation for parent gini index on sample dataset



Weighted Gini (Humidity)




Picture showing calculating the gini index of humidity with value equal to high




Picture showing calculating the gini index of humidity with value equal to Normal




Picture showing the weighted gini for humidity





Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, June 17, 2025

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250