ginigain {exactmaxsel}R Documentation

Computation of the Gini gain from a 2x2 contingency table

Description

The function ginigain computes the Gini gain (also denoted as impurity reduction) resulting by splitting into the left and the right nodes whose counts are given in the contingency table mat. See Strobl et al. (2006) for a more precise definition.

Usage

ginigain(mat)

Arguments

mat a 2x2 matrix corresponding to a two-dimensional contingency table. The first row and the second row correspond to Y=0 and Y=1, respectively. The first column and the second column correspond to the left and right nodes, respectively.

Details

Note that, in contrast to the chi-square statistic, the Gini gain does not treat X and Y symmetrically.

Value

the (positive) value of the Gini gain.

Author(s)

Anne-Laure Boulesteix (http://www.slcmsr.net/boulesteix)

References

L. Breiman, J.H. Friedman, R.A. Olshen and C.J. Stone (1984), Classification and Regression Trees, Wadsworth, Monterey, CA.

C. Strobl, A.-L. Boulesteix and T. Augustin (2006), Unbiased split selection for classification trees based on the Gini index, Computational Statistics and Data Analysis (in press).

See Also

maxsel.test.

Examples

# load exactmaxsel library
library(exactmaxsel)

# Define matrix
A<-matrix(c(15,20,22,12),2,2)

# Compute Gini gain
ginigain(A)


[Package exactmaxsel version 1.0-2 Index]