gini: Gini impurity index for cart objects

Description Usage Arguments Value Author(s) References

View source: R/miscfunctions.R

Description

A simple implementation of the Gini impurity index for classification and regression trees. Not meant to be called directly - included for demonstration purposes.

Usage

1
gini(x, class, splitpoint)

Arguments

x

Numeric vector of length n.

class

Class labels, length n.

splitpoint

Tentative split point.

Value

The Gini impurity index, given a certain split point, a vector of possible splits, and a vector of class labels. Lower values indicate more pure leaves.

Author(s)

Ron Wehrens

References

R. Wehrens. "Chemometrics with R - Multivariate Data Analysis in the Natural Sciences and Life Sciences". Springer, Heidelberg, 2011.


ChemometricsWithR documentation built on May 2, 2019, 10:25 a.m.