powered by
Computes Chi-squared-based measure between features and target vector.
calc_cs(feature, target, len_target, pos_target)
feature vector.
target.
length of the target vector.
number of positive cases in the target vector.
A numeric vector of length 1 representing computed Chi-square values.
numeric
test_features.
test_features
chisq.test - Pearson's chi-squared test for count data.
chisq.test
# NOT RUN { tar <- sample(0L:1, 100, replace = TRUE) feat <- sample(0L:1, 100, replace = TRUE) calc_cs(feat, tar, 100, sum(tar)) # }
Run the code above in your browser using DataLab