calculateDiscreteContinuousMI_KNN: calculate mutual information between a categorical value (X)...

View source: R/tidyDiscreteContinuousMI.R

calculateDiscreteContinuousMI_KNNR Documentation

calculate mutual information between a categorical value (X) and a continuous value (Y) using a sliding window and local entropy measure

Description

This is an implementation of the technique described here:

Usage

calculateDiscreteContinuousMI_KNN(
  df,
  discreteVars,
  continuousVar,
  k_05 = 4L,
  useKWindow = TRUE,
  ...
)

Arguments

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

Details

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.

Value

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


terminological/tidy-info-stats documentation built on Nov. 19, 2022, 11:23 p.m.