An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
I want to what type of Gini coeffcient used in item distribution and what is the formula to calculate Gini coeffcient and Gini index
Hi,
the one used in Trees and Weight By Gini can be found here:
https://github.com/rapidminer/rapidminer-studio/blob/master/src/main/java/com/rapidminer/operator/learner/tree/criterions/GiniIndexCriterion.java
Best,
Martin
Thank you
Is this formula used for clustring kmean evalution?
do you have the formula as mathematical equation?
for clustering its: https://github.com/rapidminer/rapidminer-studio/blob/master/src/main/java/com/rapidminer/operator/validation/clustering/exampledistribution/GiniCoefficient.java
or in code
double sum = 0; for (int i = 0; i < x.length; i++) { sum = sum + x[i]; } double mean = sum / n; sum = 0; for (int i = 0; i < x.length; i++) { for (int j = 0; j < x.length; j++) { sum = sum + Math.abs(x[i] - x[j]); } } if (mean == 0) { return 0.0; } return 1 - (sum / (2 * mean * (n * ((double) n - 1))));