hi,
Can I read a probability distribution (CPT) from a file.
I mean, instead of using
theCoordinates.UncheckedValue() = ....
theCoordinates.Next();
can I read the probability values from a file?
theCoordinates
-
- Site Admin
- Posts: 1457
- Joined: Mon Nov 26, 2007 5:51 pm
Re: theCoordinates
I'm not sure what exactly you want to achieve. Do you need to obtain the CPT from .xdsl file without using SMILE?Mastif wrote:Can I read a probability distribution (CPT) from a file.
Re: theCoordinates
I've been working in GeNIe and I created BN there. However, it was only prototype and my goal is work with SMILE.
I know the structure of my network and I need to create appropriate source code for further analysis. (setting evidence ->getting result and use it in my different calculations)
I've followed the tutorial 1 for SMILE and there I found :
// now fill in the conditional distribution for node "Forecast" using a system of
// coordinates. The probabilities are:
// P("Forecast" = Good | "Success" = Success) = 0.4
DSL_sysCoordinates theCoordinates (*theNet.GetNode(forecast)->Definition());
theCoordinates.UncheckedValue() = 0.4;
theCoordinates.Next();
Therefore, I've started wondering can I read the probability values from the file (e.g txt file) instead typing them.
I hope I am more clear now.
Thanks
I know the structure of my network and I need to create appropriate source code for further analysis. (setting evidence ->getting result and use it in my different calculations)
I've followed the tutorial 1 for SMILE and there I found :
// now fill in the conditional distribution for node "Forecast" using a system of
// coordinates. The probabilities are:
// P("Forecast" = Good | "Success" = Success) = 0.4
DSL_sysCoordinates theCoordinates (*theNet.GetNode(forecast)->Definition());
theCoordinates.UncheckedValue() = 0.4;
theCoordinates.Next();
Therefore, I've started wondering can I read the probability values from the file (e.g txt file) instead typing them.
I hope I am more clear now.
Thanks
-
- Site Admin
- Posts: 1457
- Joined: Mon Nov 26, 2007 5:51 pm
Re: theCoordinates
If you want to programatically fill the CPTs, then it's up to your program to read the input data. SMILE does not include support for such feature.Mastif wrote:Therefore, I've started wondering can I read the probability values from the file (e.g txt file) instead typing them.