public class Gini
extends java.lang.Object
This class calculates the area under the ROC curve and the Gini coefficient statistics commonly used to asses the predictive power of a score (double array) versus a binary event (String Array) .
Generally the ROC (Receiver Operator Characteristics) curve was first introduced by Green & swets (1966) and it shows the confusion matrix of sensitivity and 1-specificity.
The area under ROC will be calculated by summing the the number of cases with a positive score that are higher of the total of those with a negative score for each different score divided by the total number of good and bad combinations.
The Gini coefficient is simply
Gini%= ((2 x ROC) -1) x 100 where ROC is the area under the ROC curve
| Constructor and Description |
|---|
Gini() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
gegenie_object() |
void |
getgenie(double[] Score,
java.lang.String[] Binary)
This is the main method of the class that computes all the statistics assuming there is a score-type variable
|
void |
getgenieString(java.lang.String[] categorical,
java.lang.String[] target)
This is the method that calculates the Gini coefficient by converting a categorical variable
to numeric by using the odds of 1 category versus the other
|
double |
getGini() |
java.lang.Object |
getRoc_object() |
double |
getRoc() |
public void getgenie(double[] Score,
java.lang.String[] Binary)
This is the main method of the class that computes all the statistics assuming there is a score-type variable
Score - : An array of double values to be interpreted as 'score'Binary - : An array of Strings with exactly 2 different values (binary)public void getgenieString(java.lang.String[] categorical,
java.lang.String[] target)
This is the method that calculates the Gini coefficient by converting a categorical variable to numeric by using the odds of 1 category versus the other
categorical - : The categorical variable that serves as predictortarget - : the Binary target variablepublic double getGini()
public double getRoc()
public java.lang.Object getRoc_object()
public java.lang.Object gegenie_object()