chiSquared: Chi squared measure

Description Usage Value References Examples

View source: R/chi2.R

Description

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

Usage

1

Value

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

References

\insertAllCited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

Example output

[1] 156.2667

FSinR documentation built on Nov. 23, 2020, 5:10 p.m.