Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

21
votes
2answers
6k views

What is the relationship between the GINI score and the log-likelihood ratio

I am studying classification and regression trees, and one of the measures for the split location is the GINI score. Now I am used to determining best split location when the log of the likelihood ...
15
votes
1answer
3k views

Does Breiman's random forest use information gain or Gini index?

I would like to know if Breiman's random forest (random forest in R randomForest package) uses as a splitting criterion (criterion for attribute selection) information gain or Gini index? I tried to ...
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+...
11
votes
1answer
3k 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 ...
10
votes
5answers
341 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, ...
10
votes
1answer
14k 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 ...
10
votes
1answer
3k views

Gini coefficient and error bounds

I have a time series of data with N=14 counts at each time point, and I want to calculate the Gini coefficient and a standard error for this estimate at each time point. Since I have only N=14 counts ...
9
votes
3answers
5k views

Difference is summary statistics: Gini coefficient and standard deviation

There are several summary statistics. When you want to describe the spread of a distribution you can use for example the standard deviation or Gini coefficient. I know that the standard deviation is ...
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: ...
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 ...
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?
6
votes
1answer
15k views

Computing the Gini index

How do I compute the Gini index using Instance attribute as attribute test condition? I calculated the Gini, but I have no clue how to do it for this Instance attribute. $$\text{Gini for } a_1 = 0....
6
votes
1answer
292 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}{...
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 ...
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 ...
5
votes
1answer
9k views

Lorenz curve and Gini coefficient for measuring classifier performance

I often use a ROC curve and the area under that curve as a measure of classifier accuracy in 2-class problems, e.g: ...
5
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 ...
4
votes
1answer
5k views

How can I calculate AUC using Gini coefficient?

In the Gini Coefficient's Wikipedia page, it is defined as $G= 1 - \frac{\Sigma_{i=1}^n f(y_i)(S_{i-1}+S_i)}{S_n}$ for discrete variables, where $S_i= \Sigma_{j=1}^i f(y_i)y_i$ and $S_0=0$ ($y$ being ...
4
votes
1answer
868 views

Compare skewness of many distributions with few observations

I have a dataset with page view data for about 500,000 users, divided into two groups. Each user can visit up to 5 pages, each as many or as few times as they want. So for each user, I have the ...
3
votes
1answer
197 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
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 ...
3
votes
2answers
11k views

Random Forest: IncNodePurity and Feature Selection for Binary Logistic Regression

After creating a Random Forest object using randomForest with around 500 candidate variables, I used importance(object) to ...
3
votes
2answers
266 views

Calculating Gini coefficient with unbound income brackets?

I need to compute the Gini coefficient on some population data arranged in income brackets: for example $0->$1000 : 10000 people $1000->$10000: 50000 people ...
3
votes
2answers
188 views

Is it possible to make quantitative comparisons using income inequality metrics?

I've calculated income inequality metrics (Gini/Hoover/Theil coefficients) for several populations. I know I can make claims like "this population has a higher Gini coefficient, so its distribution in ...
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 ...
3
votes
1answer
169 views

How to compare two datasets in terms of density?

I have two 1-D datasets (A: 300,000 points and B: 30,000 points) representing genetic events along the human genome (size: 3 billions "points"). I know that A and B are not uniformly distributed along ...
3
votes
1answer
117 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 ...
3
votes
1answer
298 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 (...
3
votes
1answer
2k views

Understanding random forest, gini, and KS

I'm a beginner machine learning user, doing my first predictive model using random forest. I have some questions regarding the way to measure how good a model is (Gini area from roc curve, and KS), ...
3
votes
0answers
60 views

Can we use the Gini corefficient to calculate the standard deviation of an income distribution?

I have a question regarding the Gini coefficient. I want to know how I can calculate the $\%$ of people earning $x\$$ or less for a population in a country with a given mean income level. I know ...
3
votes
0answers
469 views

Comparing Gini coefficients: Variance estimation etc. needed?

In a project on software measurement, we plan to use aggregating statistics (e.g., Gini) to describe the concentration of certain observed program attributes (size) among program units (e.g., modules, ...
3
votes
0answers
4k views

SAS PROC LOGISTIC: Hosmer and Lemeshow test is good but Gini is bad?

I am using PROC LOGISTIC along with Class statements to do binary logit model(default=1,non-default=0) on a bank loan dataset ...
2
votes
2answers
4k views

What is a good Gini decrease cutoff for feature inclusion based upon random forests?

I am using random forests to try and determine variable importance as part of feature selection for a model I'm working on, and while I can get ranked variable importance by mean decrease in Gini from ...
2
votes
1answer
2k views

The efficiency of Decision Tree

When we use top down approach to induce a decision tree, we need to use some kind of splitting criteria to choose the splitting feature and splitting value at a certain internal node. The criteria ...
2
votes
1answer
2k views

Is it possible to get confusion matrices from AUC?

When I have one confusion matrix for each cutoff level (from 0.00 to 0.99), I can compute AUC coefficient. It looks like: ...
2
votes
1answer
606 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 ...
2
votes
1answer
1k 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-...
2
votes
1answer
3k views

Interpreting output of Cox regression model

I am trying to use two variables - activity score (ascore - a whole number indicating amount of activity) and gini (given by Gini-Simpson index - a value ranging between 0 and 1, indicating diversity ...
2
votes
0answers
521 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 ...
2
votes
1answer
6k views

How to do feature selection by using Classification and Regression Tree (CART)?

How to do feature selection by using Classification and Regression Tree? As I know, splitting data in decision tree can use Gini Index or Entropy, but it can't be used in feature selection. So how I ...
1
vote
1answer
775 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?...
1
vote
1answer
84 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)...
1
vote
1answer
385 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
37 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]). ...
1
vote
0answers
26 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 ...
1
vote
1answer
57 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 ...
1
vote
0answers
66 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 ...
1
vote
0answers
131 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 ...
1
vote
0answers
27 views

Quantifying group homogeneity

I'm trying to find a way to quantify the homogeneity of a group. An example dataset is below, where group D, for example, has 5 members of type1, 1 member of type2, and 1 member of type3. Groups A ...
1
vote
0answers
115 views

How calculate Gini coefficient (unbiased) and Lorenz Curve with stratified sample?

I'm working with a stratified sample by minimum variance method with 3 levels that becomes at 1176 stratum. The sample comes from finite population of income taxes data. I'm looking for how calculate ...