SoftEvidence => Uncaught Exception

The engine.
Post Reply
diana
Posts: 5
Joined: Wed Jun 30, 2010 4:04 pm

SoftEvidence => Uncaught Exception

Post by diana »

I have been trying to make use of the SoftEvidence feature provide by smile, but for some reason I keep getting: uncaught exception error message even for the simplest code:

vector<double> evidence;
evidence.push_back(0.20);
evidence.push_back(0.80);
int ok = theNet.GetNode(success)->Value()->SetSoftEvidence(evidence);

Note: For this testing I used the net provide in the wiki tutorial.

Anyone with experience on the subject? Any ideas?

Thank you
Diana
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: SoftEvidence => Uncaught Exception

Post by shooltz[BayesFusion] »

diana wrote:vector<double> evidence;
evidence.push_back(0.20);
evidence.push_back(0.80);
int ok = theNet.GetNode(success)->Value()->SetSoftEvidence(evidence);
Check the return value of GetNode call before proceeding.
diana
Posts: 5
Joined: Wed Jun 30, 2010 4:04 pm

Post by diana »

theNet.GetNode(success) returns 0 ( i.e. it is successful)

Also I can set "normal" evidence with SetEvidence:
theNet.GetNode(success)->Value()->SetEvidence(ev);

But with SetSoftEvidence, it just fails terminates.

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

Post by shooltz[BayesFusion] »

diana wrote:theNet.GetNode(success) returns 0 ( i.e. it is successful)
The return value of DSL_network::GetNode is DSL_node*, not integer.

theNet.GetNode(success) returns NULL pointer and it's definitely not successful. Check the value of 'success' parameter - it's not a valid node handle.
Post Reply