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

Access weighted adjacency matrix of a trained model #95

Open
zhu-yh1 opened this issue Jan 25, 2024 · 1 comment
Open

Access weighted adjacency matrix of a trained model #95

zhu-yh1 opened this issue Jan 25, 2024 · 1 comment
Assignees

Comments

@zhu-yh1
Copy link

zhu-yh1 commented Jan 25, 2024

Hi team,

I was running DECI on my own dataset. According to examples/multi_investment_sales_attribution.ipynb, I was able to output a binary adjacency matrix from my trained model.

I am wondering if it is possible to access the weighted adjacency matrix the model actually optimized during the training process, instead of only the binary matrix.

Thank you and look forward to your reply!

@meyerscetbon
Copy link
Collaborator

Hi,

In order to access to the parameters learned of the underlying independent Bernoulli distribution, you can compute the mean sem instead of the mode one. That is sem_mean = sem_module().mean instead of sem_mode = sem_module().mode and obtain the parameters of the Bernoulli's by computing sem_mean.graph.

I hope this helps,

Cheers,

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

2 participants