Closed duducrail closed 1 year ago
Does it work when you use the Colab example?
Something else that you can try; if you use jupyter notebook try to set the notebook parameter to True
bn.plot(model, interactive=True, params_interactive = { 'notebook':True})
Thanks for your fast response. bn.plot(model, interactive=True, params_interactive = { 'notebook':True}) - didn't work. And when I tried to open Colab example gave this issues:
Hi erdogant, sorry to bother again. But the colab example also didn't work. I'm putting the Game of thrones example that is working.
With colab example I got this blank on the interactive plot. Maybe is something on my side. I'll try to investigate more as well. Thanks for now. If you have any more things I can try, please I'd like to hear.
thanks, this example is useful, I will look into it!
I compared your working code with that in bnlearn and I created a few changed that -may-can-help but Im not sure because I could not create a not-working-version on my machine.
First update to the latest version with:
pip install -U bnlearn
import bnlearn as bn
# print(bn.__version__)
# Should be >= 0.5.2
I created a small example, can you try whether this works?
# Example dataset
source=['Cloudy','Cloudy','Sprinkler','Rain']
target=['Sprinkler','Rain','Wet_Grass','Wet_Grass']
# Make DAG
DAG = bn.make_DAG(list(zip(source, target)), verbose=0)
# Make plot
bn.plot(DAG, interactive=True)
Re-open if this still is an issue.
Hi, sorry for the late reply. Still didn't work. Got this blank plot.
I added the cdn resources, which can now be changed depending whether jupyter notebook/ Colab etc. It fixes the issues of blank plots in colab and on my machine.
Update to the latest version for this fix.
I am closing this issue. Reopen if it does not work.
Hi, I'm having problem to visualise interactive plots. I have installed pyvis and I did a test with Game of thrones example from pyvis using Network and works fine. But with bnlearn I got this:
Python 3.7.7 on Mac