chiSquared {FSinR}R Documentation

Chi squared measure

Description

Generates an evaluation function that calculates the Chi squared value (F.R.S. 1900), evaluating the selected features individually (individual measure). This function is called internally within the filterEvaluator function.

Usage

chiSquared()

Value

Returns a function that is used to generate an individual evaluation measure using chi squared.

References

F.R.S. KP (1900). “X. On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling.” The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 50, 157–175. doi: 10.1080/14786440009463897, https://doi.org/10.1080/14786440009463897.

Examples

## Not run:  

## The direct application of this function is an advanced use that consists of using this 
# function directly to individually evaluate a set of features
## Classification problem

# Generate the evaluation function with Chi squared
chiSquared_evaluator <- chiSquared()
# Evaluate the features (parameters: dataset, target variable and features)
chiSquared_evaluator(iris,'Species',c('Sepal.Length'))

## End(Not run)

[Package FSinR version 2.0.5 Index]