Open KevinHooah opened 5 months ago
Thank you for mentioning this. I fixed this issue before. Can you force update to the latest version of bnlearn and d3blocks?
pip install -U bnlearn pip install -U d3blocks
I created a new release of bnlearn where I included d3blocks with a minimum version of 1.4.9
I'm seeing the same issue (same output as original post) even though it appears I have the latest versions of bnlearn (0.8.5) and d3blocks (1.4.9). Do you have any idea why the issue may persist?
mmm. I need more information. Which python version are u using and does it brake also in toy examples?
python version is 3.12.2, and the examples for the interactive plots in the docs do work.
Can you shown an example with data where it does not work
Do you maybe have not-unique node names?
Hello,
Having the exact same problem. Nodes have unique names in my case.
Here is a snapshot of my data:
Engine Status Speed Status_Alpha Alpha_Temp Status_Beta
0 0 0.25 0 170 0
1 0 0.21 0 170 0
2 0 0.25 0 170 0
3 0 0.21 0 170 0
4 0 0.21 0 170 0
Beta _Temp Status_Delta Delta_Temp Status_Echo Echo_Temp
0 190 0 170 0 40
1 190 0 170 0 40
2 190 0 170 0 40
3 190 0 170 0 40
4 190 0 170 0 40
Mix_Gas Mix_98 Mix_95 Cost Energy
0 0 1 0 0.64 8.64
1 0 1 0 0.82 6.07
2 0 1 0 0.90 5.96
3 0 1 0 1.14 4.89
4 0 1 0 0.95 5.11
As you can see, it is a mix of discrete and continuous data (that I discretized)
I have the feeling it has to do with the names. Maybe underscores or other special characters are replaced somewhere to prevent errors in the final results which leads to this error but I do need more information.
I resolved the issue after several iterations. The error in the interactive plot was due to a mismatch in how node names were cleaned: they were sanitized in d3blocks but not in bnlearn's interactive plot, leading to inconsistencies. Update to the latest version and try again!
pip install -U bnlearn
The error does not show anymore ! Seems to be all good.
Hello,
When I am going to plot the interactive figure (the static figure works fine), I get the following errors:
I check the number of node and the number of tip in the
bnlearn.py
'splot
function, before it callsfig = _plot_interactive
, the number of nodes equals the number of tip.I also get these output before the error pops out, incase it is helpful:
Thank you for your help in advance.