erdogant / bnlearn

Python library for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.
https://erdogant.github.io/bnlearn
Other
465 stars 46 forks source link

arc.strength bnlearn r implementation #44

Closed PARODBE closed 2 years ago

PARODBE commented 2 years ago

Hi again @erdogant ,

Do you think that could be easy implement the strength of the relations of the nodes like in r??? It could be interesting...https://www.rdocumentation.org/packages/bnlearn/versions/0.8/topics/arc.strength

thanks!

erdogant commented 2 years ago

Great suggestion. I will look into this.

PARODBE commented 2 years ago

Thanks @erdogant , moreover the strength can be represented in the neural network graph for example in bnlearn library of r you can do it using a Bic score or chi square (there are more possibilities I am sure), and after you could put for example bold arrow for statistical significant relations between nodes, and also you can choose the different threshold of p value (0.5,0.01,0.001 etc...), there are a great quantity of options...

erdogant commented 2 years ago

indeed. The chi square and related independence tests I will definitely start with. However, something that would be even nicer is like boot.strength() as it estimates the strength of each arc as its empirical frequency over a set of networks learned from bootstrap samples. This would also solve one of your earlier questions I guess.

https://search.r-project.org/CRAN/refmans/bnlearn/html/arc.strength.html

erdogant commented 2 years ago

Computing significance to determine the edge strength is now implemented! More information can be found here.

Examples can be found in the readme and here

Update with:

pip install -U bnlearn

PARODBE commented 2 years ago

Uoooo you are brilliant @erdogant !! Thank you for all!

erdogant commented 2 years ago

enjoy!