Learn R Programming

biogram (version 1.0)

test_features: Permutation test for feature selection

Description

Performs a feature selection on positioned N-gram data using a Fisher's permutation test.

Usage

test_features(target, features, criterion = "ig", quick = TRUE,
  times = 1e+05)

Arguments

target
target vector.
features
integer matrix of features with number of rows equal to the length of target vector.
criterion
the criterion used in permutation test. See criterions for the list of possible criterions.
quick
logical, if TRUE Quick Permutation Test (QuiPT) is used.
times
number of times procedure should be repetead. Ignored if quick is TRUE.

Value

  • a vector of objects of htest class that relate to each feature tested

Details

Currently implemented criterions:
  • "ig" - information gain

References

Radivojac P, Obradovic Z, Dunker AK, Vucetic S, Feature selection filters based on the permutation test in Machine Learning: ECML 2004, 15th European Conference on Machine Learning, Springer, 2004.

See Also

See criterion_distribution for insight on QuiPT.

Examples

Run this code
tar_feat1 <- create_feature_target(10, 390, 0, 600)
tar_feat2 <- create_feature_target(9, 391, 1, 599)
tar_feat3 <- create_feature_target(8, 392, 0, 600)
test_features(tar_feat1[,1], cbind(tar_feat1[,2], tar_feat2[,2],
tar_feat3[,2]))

Run the code above in your browser using DataLab