View source: R/tidyDiscreteContinuousMI.R
calculateDiscreteContinuousMI_KNN | R Documentation |
This is an implementation of the technique described here:
calculateDiscreteContinuousMI_KNN( df, discreteVars, continuousVar, k_05 = 4L, useKWindow = TRUE, ... )
df |
- may be grouped, in which case the value is interpreted as different types of continuous variable |
discreteVars |
- the column(s) of the categorical value (X) quoted by vars(...) |
continuousVar |
- the column of the continuous value (Y) |
k_05 |
- half the sliding window width - this should be a small number like 1,2,3. |
useKWindow |
- will switch to using the much faster KWindow estimator for larger sample sizes (>500) when the difference between the 2 methods is negligable |
B. C. Ross, “Mutual information between discrete and continuous data sets,” PLoS One, vol. 9, no. 2, p. e87357, Feb. 2014 [Online]. Available: http://dx_doi.org/10.1371/journal.pone.0087357
But it is very slow. Empirically it also does not give any better estimate that the KWindow method.
a dataframe containing the disctinct values of the groups of df, and for each group a mutual information column (I). If df was not grouped this will be a single entry
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.