Hi, I have been trying to set evidence to my model using my own data. I read all tutorials but I found no exact information on how to set evidence to each node in the model using data file. Can anyone help? Thanks
What I need is the probability of evidence of each data record in my model. My code (incomplete) is below:
for (int k=0;k<ds.GetNumberOfRecords();k++){
for (int i=0;i<ds.GetNumberOfVariables();i++){
SetEvidenceById(net,ds.GetId(i).c_str(), ds.);
}
net.UpdateBeliefs();
net.CalcProbEvidence(pe,false);
printf("\nProbability of Evidence=%f\n",pe);
}
Peng
set evidence to model using data
-
- Site Admin
- Posts: 1419
- Joined: Mon Nov 26, 2007 5:51 pm
Re: set evidence to model using data
Does your data file contain numbers or text?