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.

Filter by
Sorted by
Tagged with
6
votes
1answer
1k views

Deviance vs Gini coefficient in GLM

What are the pros and cons of using Deviance as opposed to Gini coefficient when measuring the quality of regression / classification models? From experience, I see that people like Gini more than ...
0
votes
1answer
20 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 ...
0
votes
0answers
26 views

Understanding Gini Coefficient Derivation in Credit Risk

I am interested in evaluating feature/characteristic importance in a credit risk scorecard. I found the following paper on using the Gini Coefficient for this purpose: http://www.rhinorisk.com/...
0
votes
0answers
40 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 ...
7
votes
2answers
7k views

How is the Weighted Gini Criterion defined?

I am interested in trying out and/or implementing the Weighted Random Forest (WRF) algorithm described in Chen, Liaw, Breiman. How is the Weighted Gini impurity actually defined? What implementations ...
2
votes
1answer
403 views

Comparing Gini coefficient of 2 distributions

I wonder if it is fair is to compare the gini coefficient of two discrete distributions with different number of elements. If not, how can I adjust the coefficients for a fair comparison. In ...
0
votes
1answer
149 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 ...
0
votes
0answers
34 views

How Gini/AUC of two features is bounded by individual features?

Consider binary classification problem and popular quality measure ROC AUC (which is almost the same as Gini coefficient G = 2*AUC - 1 ). Assume we have two features F1, F2. Question (rough version)...
0
votes
1answer
118 views

The reason why Gini index is in favor of multivalued attributes

I am a beginner in data science and I try to understand the similarity and dissimilarity between information gain and Gini index. In my lecture notes, the professor states one of disadvantage of Gini ...
0
votes
0answers
14 views

How to calculate the Gini coefficient from vectors of income rather than cumulative income?

I want to calculate the Gini coefficient of a dataset of assets for which I the cumulative share of the population $W$ and the monthly returns $Y$. $$G=1-\sum _{{k=0}}^{{n-1}}(X_{{k+1}}-X_{{k}})(...
0
votes
0answers
13 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 ...
0
votes
0answers
62 views

Calculate Gini coefficient by hand

I have been asked to calculate the Gini coefficient (dispersion of allocation weighting) in 18 sectoral ETFs with historical data available since 2000. Here is an excerpt: ...
0
votes
2answers
38 views

Gini index in classification tree

In Gareth etc.'s book "An introduction to statistical learning", when it's talking about Gini index, I clipped the paragraph in the following image: My question is the statement that "For this reason ...
3
votes
1answer
146 views

how does splitting at a node occur in a decision-tree with non-categorical data?

According to a website (:http://dataaspirant.com/2017/01/30/how-decision-tree-algorithm-works/) , these values are chosen randomly for both gini index and Entropy method: I don't think this is the ...
0
votes
1answer
30 views

Is Gini index actively involved in splitting a Random Forest node?

Since there are many references that a RF uses a slightly different approach on splitting a node in comparison to Vanilla Bagging. Does Gini index play an active role in the split or it's just another ...
7
votes
2answers
8k views

A simple & clear explanation of the Gini impurity?

In a context of decision tree splitting, it is not obvious to see why the Gini impurity $$ i(t)=1-\sum\limits_{j=1}^k p^2(j|t) $$ is a measure of node t impurity. Is there an easy explanation of this?
1
vote
0answers
29 views

Classification trees: contingency table and Gini index at split point (grouped categories)

I am working through chapter 14 of the book Applied predictive modeling (Kuhn, Max, and Kjell Johnson. Applied predictive modeling. Vol. 26. New York: Springer, 2013.). For tree models with categorial ...
0
votes
0answers
42 views

Lorenz Curve for Insurance Pure Premium

I'm testing various pure premium models and want to make a Lorenz curve to compare the models. The goal is to show underwriters which models are better. I'm not sure if I'm doing it correctly. I'm ...
1
vote
1answer
101 views

Number of all possible splits in each node of trees in a Random Forest

The trees in a Random Forest are grown by recursive splitting the nodes, and the best split in each node is obtained by using the Gini index, I want to know if there is a possibility to know the ...
11
votes
4answers
2k views

Trying to compute Gini index on StackOverflow reputation distribution?

I'm trying to compute the Gini index on the SO reputation distribution using SO Data Explorer. The equation I'm trying to implement is this: $$ G(S)=\frac{1}{n-1}\left(n+1-2\left(\frac{\sum^n_{i=1}(n+...
0
votes
0answers
204 views

What does a high GINI in a random forest model imply?

I ran a classification problem using random forest to predict whether a customer will have more than zero revenue in the next 12 months. I am getting a gini of 95 and accuracy of 90% as well. I know ...
0
votes
1answer
128 views

Interpreting MeanDecreaseGini graph in R

Using the randomForest package in R, I fitted a customer churn dataset to a random forest model. The first objective was to identify the most important variables in ...
0
votes
0answers
15 views

How can I distill revenue diversity into a single number?

I have a dataset of revenue per customer per month. I want to have a measure of the diversity of this revenue, for which (to me) there are two aspects: More customers is better A more equal ...
1
vote
1answer
42 views

Gini above 1 when bootstrapping

Let's say I have a dataset (data), which contains the binary target variable class and the predictions (probabilities in [0,1]). ...
3
votes
1answer
207 views

Gini coefficient

I’m learning about inequality measures, there are several ways to calculate it and I understand all but one. $\kappa = \frac{E|X-X^\prime|}{2E(X)}$ I’m not sure what the second x means in the case ...
3
votes
1answer
1k views

GINI and AUC relationship

I know there is a relationship between GINI coefficient and AUC. But can anyone tell me how to get this relationship? Most people get it from geometric deviation from ROC curve. But the thing is how ...
0
votes
1answer
99 views

Gini coefficient finite sample correction

I wanted to compute some gini coefficients for different populations of differents sizes. In R I used the ineq package containing a Gini coefficient implementation. One of the paramater (i.e. corr) ...
0
votes
0answers
104 views

Computing Gini index and cross-entropy for a dendrogram

I am trying to calculate purity of clusters obtained through hierarchical clustering. I followed this tutorial here: Decision tree learning My question is: is computing these measures the same for ...
3
votes
3answers
2k views

How to compare frequency distributions

I have one categorical variable that can assume 5 possible values: 1, 2, 3, 4, 5. I observe the value of the variable in two samples of different size. Now I want to compare the frequency distribution ...
1
vote
1answer
108 views

Gini index/criterion/impurity/coefficient according to Breiman, Sen, Bishop, and Duda

once again a student (me) is lost in the sea of Gini... I am currently trying to figure out, where the Gini based formula for feature selection proposed by Cehovin and Bosnic [1] comes from: $Gini(A)...
3
votes
1answer
336 views

Optimal classifier or optimal threshold for scoring

In practice, there can be a classifier that gives far better performance at a specific acceptable threshold than an "optimal" classifier with better average performance across range of thresholds (...
1
vote
0answers
80 views

Gini index question

If a country A has a higher Gini index than country B, can you interpret this as that the income distribution in A is lower because of the higher inequality? So we would expect to see wealth being ...
11
votes
1answer
4k views

Why use Normalized Gini Score instead of AUC as evaluation?

Kaggle's competition Porto Seguro's Safe Driver Prediction uses Normalized Gini Score as evaluation metric and this got me curious about the reasons for this choice. What are the advantages of using ...
1
vote
1answer
949 views

Is GINI limited to binary classifiers or can we use it for multi-class classifiers as well?

I have looked around and have seen GINI being used mostly in the context of binary classifiers. Does GINI make sense only for binary classifiers? Can we extend the definition to multiclass classifiers?...
0
votes
1answer
38 views

Gini coefficients - Accounting for firm exits

What is the appropriate way to measure the Gini coefficient over time in an industry where a large number of firms are exiting? Should the Gini coefficient be calculated using the initial number of ...
5
votes
3answers
1k views

Basic Gini impurity derivation

From wikipedia: https://en.wikipedia.org/wiki/Decision_tree_learning I am unable to get my head around two of the steps: The first equation: $f_i(1 - f_i)$. This does not immediately become ...
6
votes
1answer
308 views

How to get approximative confidence interval for Gini and AUC?

I found an interesting way to calculate a confidence interval for the Gini and respectively AUC coefficient for credit risk scoring. Question: Can anyone explain me, why the sum $$ AUC = \frac{1}{...
10
votes
5answers
359 views

How to measure dispersion in word frequency data?

How can I quantify the amount of dispersion in a vector of word counts? I'm looking for a statistic that will be high for document A, because it contains many different words that occur infrequently, ...
1
vote
1answer
60 views

Is it appropriate to compare sports with different-length seasons using Gini?

I made this plot to try and compare the competitiveness of the major US sports (NHL/NBA/MLB/NFL): Each point of a given color represents, for a given season, the Gini coefficient of the win ...
9
votes
1answer
6k views

logloss vs gini/auc

I've trained two models (binary classifiers using h2o AutoML) and I want to select one to use. I have the following results: ...
2
votes
1answer
689 views

Are decision trees sensitive to log translations in feature space?

This question was partially answered on Are decision trees sensitive to translations in feature space?, but no references were provided for "Gini impurity and entropy measures are translation ...
1
vote
1answer
716 views

How to compute the Wealth Lorenz curve with negative values?

I have some data with asset holdings (wealth) of a large group of people. I want to compute the Lorenz curve and Gini coefficient of my population. The problem is that a large fraction of people have ...
12
votes
1answer
16k views

What is the difference between GINI and AUC curve interpretation?

we used to create GINI curve using lift created with help of percentage of good and bad for scorecard modelling. But what I have studied that ROC curve is created using Confusion matrix with ...
2
votes
1answer
2k views

Random Forest: Class-specific Gini variable importance in R?

library(randomForest) data(iris) fit <- randomForest(Species ~ ., data=iris, importance=TRUE); fit.imp<-importance(fit) fit.imp columns 1-3 show the class-...
0
votes
0answers
128 views

Deducing an approximation to the Gini coefficient

Assuming we do not know the Lorenz curve function, If $(X_k, Y_k)$ are the known points on the Lorenz curve, with the $X_k$ indexed in increasing order $(X_{k – 1} < X_k)$, so that: $X_k$ is the ...
1
vote
1answer
409 views

Lognormal parameters knowing GDP per-capita, Gini coefficient and quintile shares

How can i recover μ and σ for the lognormal distribution (income) knowing mean GDP per-capita (which should be my μ) and the Gini coefficient with data on 5 quintile income shares? Thanks to all. σ ...
1
vote
1answer
36 views

Correcting for season-length bias of Gini on win percentage

I made this plot to try and compare the competitiveness of the major US sports (NHL/NBA/MLB/NFL): Each point of a given color represents, for a given season, the Gini coefficient of the win ...
6
votes
1answer
2k views

Rank correlation statistics comparison

I am trying to understand the relative behavior of the following rank correlation statistics: Spearman coefficient Kendall Tau / Concordance percentage Normalized Gini coefficient (area under curve ...
2
votes
0answers
553 views

How to compare two Gini results?

I'm comparing two Gini results from two distributions of income, in which one income is a source of the other. Let, say that Gini_1 = 0,770 and Gini_2 = 0,373. Clearly, Gini_2 shows a less inequal ...
1
vote
0answers
138 views

Gini coefficients : compare two samples with different sample sizes

I've two samples representing the distribution of tumor cell clones in two patient. In sample 1 I've about 10,000 clones - each clone has a relative abundance (so the sum of the relative abundance of ...