giniIndex {FSinR} | R Documentation |
Gini index measure
Description
Generates an evaluation function that calculates the gini index (Ceriani and Verme 2012-Sep-01) of discrete features (set measure). This function is called internally within the filterEvaluator
function.
Usage
giniIndex()
Value
Returns a function that is used to generate an evaluation set measure using the Gini index value for the selected features.
Author(s)
Adan M. Rodriguez
References
Ceriani L, Verme P (2012-Sep-01). “The origins of the Gini index: extracts from Variabilità e Mutabilità (1912) by Corrado Gini.” The Journal of Economic Inequality, 10, 421–443. doi: 10.1007/s10888-011-9188-x.
Examples
## Not run:
## The direct application of this function is an advanced use that consists of using this
# function directly to evaluate a set of features
## Classification problem
# A discrete dataset is used (in this case we use only several discrete columns)
adult <- adult[,c(4,9,10,15)]
# Generate the evaluation function with Gini index
giniIndex_evaluator <- giniIndex()
# Evaluate the features (parameters: dataset, target variable and features)
giniIndex_evaluator(adult,'income',c('race','sex','education'))
## End(Not run)
[Package FSinR version 2.0.5 Index]