# Questions tagged [gini]

The Gini coefficient is used to measure income inequality and discriminatory power of a classifier. If everybody has the same income, Gini coefficient = 0. If one person has all the income, Gini coefficient = 1. All other values are somewhere in between.

119 questions
Filter by
Sorted by
Tagged with
445 views

### How is Gini impurity related to accuracy when predicting the majority class?

For simplicity, consider the binary case, where we have a set of elements with each element belonging to one of two classes (0 or 1). Let p(j) be the proportion of ...
• 21
40 views

### Is it possible to calculate a standard deviation from the gini coefficient and mean?

I am looking to create an analysis showing how many people in a given country have more than than X dollars in income. I know the average income, population count, and Gini Coefficient of income ...
• 31
56 views

### Relation between gini coefficient/accuracy ratio and roc_auc_score when there are many identical predictions

I have been working on ranking metrics related to various estimators lately, and cam a across a curious phenomenon related to the Gini-coefficient which I would like to understand better. I will start ...
243 views

### Gini impurity greedily optimises a loss function in decision trees

I am trying to understand how the Gini criterion for decision decision tree construction actually greedily optimises a loss function. The Gini impurity, sometimes also called Gini index, for a region (...
• 339
35 views

• 559
774 views

### Why is my logistic regression outperforming neural networks?

I have 5 samples (each one contains ~380K records, 33 predictive variables and 1 binary Target): one sample is used to train the models the remaining 4 samples are used to validate the models The ...
120 views

### variations in 4-fold cross-validation coefficients

What does it mean when one of 4-folds Gini coefficient has a low number. For instance 83%, 84%, 85% and 75%? Is this variation is in a normal range? Can it be caused by outliers? Does it worth ...
• 205
160 views

### Splitting criterion of classification tree: Does the growth process come naturally to a stop?

With respect to growing a classification tree: Does growing with Gini or Cross-entropy (CE) imply we would grow the tree until every leaf is pure (in case of no other stopping criteria)? Put ...
• 735
123 views

### Remove fatures with low Gini importance score to improve accuracy of Random forest

For a research project on a networking related subject, I am training and testing a Random forest model with a data set that contains 20 features. Initially, I obtained a baseline accuracy of around ...
• 33
240 views

### How are entropy and Gini Impurity related?

I know the differences between entropy and Gini impurity and why we use Gini in order to construct trees. But I would like to find some relation between those two measures. It leads me to one ...
• 141
62 views

### Is my understanding of the Gini plot to detect fat tails correct?

I'm trying to reproduce the following plot: which was generated on the Danish dataset of fire insurance claims using the ineq() function (a wrapper for functions ...
• 26.6k
1 vote
410 views

### Derive Gini coefficient of lognormal distribution from definition

The Gini coefficient of a lognormal distribution $\operatorname{Lognormal}(\mu, \sigma^2)$ is $\operatorname{erf}(\sigma / 2)$, where $\operatorname{erf}$ is the error function. But how do I derive ...
• 492
997 views

### GridsearchCV() gives optimum criterion for Decision Tree should be entropy, but why am I getting better accuracy with Gini?

I ran this code ...
1 vote
25 views

• 30.3k
24 views

### When calculating the Gini coefficient for the US, how should the portion of the population which has not filed a return be incorporated?

The Gini coefficient $G$ is a commonly used measure of income distribution inequality, taking values from 0 (meaning every individual in the population has an identical income) to 1 (meaning a single ...
• 30.3k
3k views

### How to derive equation of Gini index used in Decision Trees?

Gini coefficient formally is measured as the area between the equality curve and the Lorenz curve. By using the definition I can derive the equation However, I can't obtain the exact Gini index ...
• 173
415 views

### Gini Index of Vector with Negative Values

I would like to use the Gini Index to measure the sparsity in a signal. From my research so far it seems that the Gini Index is defined for a vector of positive values. My vector however also contains ...
• 21
1 vote
29 views

### Calculate GINI inequality coefficient from IRS SOI data

I am trying to calculate the GINI coefficient from the IRS SOI dataset using the adjusted gross income (AGI) bins provided in the csv. I know this will not be an exact GINI index score, and only a ...
• 55
96 views

### Gini values are not corresponding with Lorenz Curve area

I'm using Gini coefficient and Lorenz Curve plots to show the accumulation of beneficiaries in ecosystem services (ES) supply points, in R. I classify ES into three categories and calculate Gini and ...
• 111
1 vote
161 views

### Gini and Lift With Transformed Variable

With regards to Gini Index/Net Lift, If I build a model where the target value is transformed by something - say natural log for example - will the Gini and Lift calculated on the transformed variable ...
• 135
351 views

### What do all the distributions that have the same Gini index have in common?

According to the Wikipedia article about Income inequality metrics, Gini index have the next disadvantage: As a disadvantage, the Gini index only maps a number to the properties of a diagram, but the ...
• 101
1 vote
161 views

### Decision trees minimizing the Gini error

I was reading the Elements of Statistical Learning and I stumbled upon the formula for minimizing the misclassification error. I was wondering if I could write something like that for the Gini index. ...
• 237
3k views

### What is the difference between Gini index and Gini coefficient?

I am building a decision tree from scratch. I have been using entropy so far (calculated this way): ...
1k views

### Can someone explain to the Gini Index for a tree?

So I know what the formula for the Gini index. However, I have a few questions that I am hoping to clarify. I saw this, which tells you how to calculate the Gini index for each feature: Computing ...
• 3,253
1 vote
56 views

### Why is the off-diagonal summation notation for the Gini index used only in classification problems with more than 2 classes?

The formula for the Gini index as a node impurity measure can be written as: $Gini(q)= \sum_{k=1}^M p_{qk}(1-p_{qk})$ Where $q$ is the node and $M$ represents the number of classes. Why can we only ...
• 233
1 vote
44 views

### Looking at two PDF plots, is it possible to guess which distribution has a greater Gini coefficient?

By observing the PDF of two different distributions over the same support (as in the image), is it possible to infer which PDF describes the distribution with the greater Gini coefficient? I assume ...
• 21
690 views

### decision tree training: gini vs entropy vs precision vs recall

When training decision trees, the standard algorithms (e.g. ID3, C4.5, C5.0) use either the gini index or entropy to determine which node to add next. Only once the tree is built, and the ROC curve is ...
2k views

### Gini Index Formula

I've read many related articles and posts. The more I read, the more I got confused about 'Gini index' and 'Gini Impurity'. I understood the concept but it seems to me that these things are used ...
• 1,044
762 views

### What are the loss function used in Gradient Boosting vs Random Forest? Would Gini/ Entropy work for both models?

When I look at Python package tutorials, I compared the function for GradientBoostingClassifier and RandomForestClassifier and found 2 differences: 1) GBM does not mention 'Gini' or 'Entropy', which ...
4k views

### High AUC but low R squared in a random forest classifier

I have been looking for an answer on this website and on Google but I can't seem to find a clear explanation anywhere. The problem is the following. I built a Random Forest model (using Python's ...
• 158
1k views

### Measuring relative variability for variables with different scales II

I'm reformulating this question to see if I might have better luck than OP did at encouraging a response. Consider that you have two univariate datasets at different scales, and need to establish ...
• 637