The RapidMiner community is on read-only mode until further notice. Technical support via cases will continue to work as is. For any urgent licensing related requests from Students/Faculty members, please use the Altair academic forum here.

# calculating gini index

Member Posts: 3 Contributor I
edited November 2018 in Help

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:

• Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,525 RM Data Scientist
Solution Accepted
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany
• Member Posts: 3 Contributor I
Solution Accepted

Thank you

Is this formula used for clustring kmean evalution?

do you have the formula as mathematical equation?

• Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,525 RM Data Scientist
Solution Accepted

Hi,

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, Germany