Hi,
I am very new to SMILE. I am using PySMILE to read the 'ventureBN.xdsl'. So far it works okay.
However, in my actual BN, which is created from GeNie has many nodes (about 29). I am required to update the CPT of one of the node in the BN regularly at a given time point. I have the updated data for that node stored in a .csv (Excel) file. The columns of the csv file gives the outcome probability of that node. Is there a way to do this in PySMILE? An example using the ventureBN.xdsl would be okay. Say, for example, how do I update/change cpt of the 'Forecast' node in that example?
Any help is appreciated
update cpt of a node regularly
-
- Site Admin
- Posts: 1422
- Joined: Mon Nov 26, 2007 5:51 pm
Re: update cpt of a node regularly
To modify node's CPT, you should call set_node_definition. Refer to Tutorial 1 in SMILE Wrappers Manual - the tutorial program initializes the CPT with probabilities hardcoded into the Python source. In your case, you'll need to create an array from the CSV file, then call set_node_definition.