Skip to content

Conversation

@franck-simon
Copy link
Collaborator

Test case:
library (miic)
{
set.seed(0)
df = data.frame ("X"=rnorm (100000), "Letters"=sample (LETTERS, 100000, replace=T), stringsAsFactors=F)
df$Y = log (abs (df$X) + 1) + rnorm (100000, sd=0.1)
head (df)
cmi_obj = computeMutualInfo(df$X, df$Y)
cat ("computeMutualInfo:\n")
cat (paste0 ("- info : ", cmi_obj$info, "\n") )
cat (paste0 ("- infok: ", cmi_obj$infok, "\n") )
mo = miic (df)
cat ("MIIC:\n")
print (mo$summary[1, c("x", "y", "ai", "info", "info_shifted")])
}

Before fix
computeMutualInfo:

  • info : 114250.559936407
  • infok: 111448.36527357
    Search all pairs for unconditional independence relations...
    Search for candidate separating nodes...
    [========================================] 100% eta: 0s
    Search for edge directions...
    Number of edges: 1
    MIIC:
    x y ai info info_shifted
    1 X Y 114288.7 111437.9

After fix
computeMutualInfo:

  • info : 114250.559936407
  • infok: 111448.36527357
    Search all pairs for unconditional independence relations...
    Search for candidate separating nodes...
    [========================================] 100% eta: 0s
    Search for edge directions...
    Number of edges: 1
    MIIC:
    x y ai info info_shifted
    1 X Y 114250.6 111448.4

Copy link
Contributor

@Alich13 Alich13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants