Outcomes

The engine.
Post Reply
nikkne
Posts: 19
Joined: Tue Mar 18, 2008 8:03 pm

Outcomes

Post by nikkne »

Hi,
In my program, I read the network file, which has the default outcome names. I would like to update the outcomes dynamically (ie. while I read the data set from the separate file). So, I thought that by doing RemoveOutcome(i) or SetNumberOfOutcomes(0) I would annulate current outcomes.
Well, it seems that it is not working... How can I remove all outcomes, and install new ones?

Thanks!
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Outcomes

Post by shooltz[BayesFusion] »

RemoveOutcome will fail if you have just two states/choices - SMILE always keeps the network in consistent state, and discrete node with just one outcome certainly breaks the consistency.

SetNumberOfOutcomes will fail if node has children. This is rather obscure method, mainly used by file I/O :)

If you just want to change the identifiers of outcomes, use DSL_nodeDefinition::RenameOutcome[s].
Post Reply