View source: R/normalizedGini.R
normalizedGini | R Documentation |
This function calculates the Gini index of a classification rule outputting probabilities. It is a classical metric in the context of Credit Scoring. It is equal to 2 times the AUC (Area Under ROC Curve) minus 1.
normalizedGini(actual, predicted)
actual |
The numeric binary vector of the actual labels observed. |
predicted |
The vector of the probabilities predicted by the classification rule. |
The Gini index of the predicted probabilities as a single 'num'.
Adrien Ehrhardt
normalizedGini(c(1, 1, 1, 0, 0), c(0.7, 0.9, 0.5, 0.6, 0.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.