The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
calculating gini index
2015228094
Member Posts: 3 Contributor I
I want to what type of Gini coeffcient used in item distribution and what is the formula to calculate Gini coeffcient and Gini index
Tagged:
0
Best Answers
-
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
Hi,
the one used in Trees and Weight By Gini can be found here:
Best,
Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany1 -
2015228094 Member Posts: 3 Contributor I
Thank you
Is this formula used for clustring kmean evalution?
do you have the formula as mathematical equation?
0 -
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
Hi,
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))));Best,
Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany1