Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signed Mutual Information #43

Open
tetomonti opened this issue Aug 29, 2023 · 0 comments
Open

Signed Mutual Information #43

tetomonti opened this issue Aug 29, 2023 · 0 comments

Comments

@tetomonti
Copy link
Collaborator

[Note: I'm adding the content of my email here for record keeping]

The reason revealer returns a signed MI is because it multiplies the actual MI by the sign of the features’ correlation.
In the code, you will see that cond_mutual_inf has the step (line 202):

CIC <- sign(rho) * sqrt(1 - exp(-2 * CMI))`

And and the mutual_inf_v2 function has the step (line 248)

IC <- sign(rho) * sqrt(1 - exp(-2 * MI))`

Which basically multiplies the MI by the sign of the correlation (rho) between the two variables.

I think we can do the same in our knnmi-based score. In order not to lose efficiency, we could call the cor function on the entire set of features. i.e., when computing the MI between X and all the remaining features, say, REST, do something like

MI <- knnmi(X,REST,Z)
RHO <- cor(X,REST)
SMI <- MI * sign(RHO)
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

No branches or pull requests

1 participant