minMaxCmiScores | R Documentation |
For each feature, calculates the conditional mutual information between this feature and the decision, conditioned on all other features, and returns extreme values, that is
min_j I(X_i;Y|X_j)
and
max_j I(X_i;Y|X_j).
minMaxCmiScores(X, Y, threads = 0)
X |
Attribute table, given as a data frame with either factors (preferred), booleans, integers (treated as categorical) or reals (which undergo automatic categorisation; see below for details).
Single vector will be interpreted as a data.frame with one column.
|
Y |
Decision attribute; should be given as a factor, but other options are accepted, exactly like for attributes.
|
threads |
Number of threads to use; default value, 0, means all available to OpenMP. |
A numerical matrix with minimal (first row) and maximal (second row) pairwise conditional mutual information scores, with names copied from X
.
The method requires input to be discrete to use empirical estimators of distribution, and, consequently, information gain or entropy. To allow smoother user experience, praznik automatically coerces non-factor vectors in inputs, which requires additional time, memory and may yield confusing results – the best practice is to convert data to factors prior to feeding them in this function. Real attributes are cut into about 10 equally-spaced bins, following the heuristic often used in literature. Precise number of cuts depends on the number of objects; namely, it is n/3, but never less than 2 and never more than 10. Integers (which technically are also numeric) are treated as categorical variables (for compatibility with similar software), so in a very different way – one should be aware that an actually numeric attribute which happens to be an integer could be coerced into a n-level categorical, which would have a perfect mutual information score and would likely become a very disruptive false positive.
minMaxCmiScores(iris[,-5],iris$Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.