Bar Chart Display

The engine.
Post Reply
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Bar Chart Display

Post by jdtoellner »

I'd like to suggest a new feature.

I prefer to view networks with bar charts but can't enable that in SMILE.

Can you expose an API so I can do that?

(I'd also want to set the bar chart size.)

I can do this by editing the XML however, a SMILE API would be easier.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bar Chart Display

Post by shooltz[BayesFusion] »

Thanks for the suggestion. For the historical reasons, the barchart vs icon setting is stored in GeNIe-managed part of the XDSL file. We currently don't have plans to add this functionality to SMILE.
Marijn Peppelman
Posts: 23
Joined: Mon Jul 08, 2019 3:14 pm

Re: Bar Chart Display

Post by Marijn Peppelman »

Hello,

Is the above still accurate?

I'm planning to generate quite a big network using code, and would like to be able to view at a glance what the state/probability of quite a few nodes is, withouth having to set all of them to bar chart view manually.

In the alternative, is it possible to set node color from SMILE/PySMILE?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bar Chart Display

Post by shooltz[BayesFusion] »

You can now set the barchart view for the nodes. In C++, use DSL_screenInfo's data members barchartActive, barchartWidth and barchartHeight.

Code: Select all

DSL_node *node = ...
DSL_screenInfo &scr = node->Info().Screen();
scr.barchartActive = true;
scr.barchartWidth = 200;
scr.barchartHeight = 500;
PySMILE has the following methods of the Network class:

Code: Select all

is_node_chart_enabled
set_node_chart_enabled
get_node_chart_size
set_node_chart_size
Node colors were always supported. In C++ DSL_screenInfo has integer members, which store colors (using Windows COLORREF format, which is BBRRGG). PySMILE has get/set_node_XYZ_color, where XYZ can be either "bg", "text", or "border".

BTW, while we have expanded and revised C++ SMILE manual already at https://support.bayesfusion.com/docs, the work on the wrappers manual revision is still ongoing.
Marijn Peppelman
Posts: 23
Joined: Mon Jul 08, 2019 3:14 pm

Re: Bar Chart Display

Post by Marijn Peppelman »

Good to know, thank you!

I'll probably be posting here a bit more soon-ish, seems GeNie doesn't much care for working through a ~32k node network... but that is mostly my own fault for wanting to see lots of intermediate steps, and some overly large auto-generated node names. Hopefully i can compress it a bit.

Bit off-topic, as i guess it should be under the GeNIE forum, but is there a known network size limit?
FWIW, i have no nodes of degree > 3, and all nodes are 2 state (true/false), so max definition size per node is 8, but lots are 4.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bar Chart Display

Post by shooltz[BayesFusion] »

seems GeNie doesn't much care for working through a ~32k node network...
If GeNIe performs inadequately, maybe you can share your model? Send me a private forum message if this is possible. We will profile and pinpoint the hotspots.
but is there a known network size limit?
It's quite hard to establish. For network representation itself, the indegree is the most important factor - you can have a node with a couple of dozen of parents to blow its CPT. On the other hand, even if your nodes have three parents or less, the intermediate structures required to perform the exact inference may grow exponentially (basically cliques in the jointree).

If the inference is the problem, you can consider sampling (EPIS), or if you're interested only in a subset of node posteriors, use explicit targets. Another option would be noisy decomposition if you can represent your network with noisyMAX nodes.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bar Chart Display

Post by shooltz[BayesFusion] »

Please check your PMs.
Post Reply