|NORSYS SOFTWARE © 2012||NETICA API||C   VERSION   5.04 |
|void LearnCPTs_bn (||learner_bn* learner, const nodelist_bn* nodes, const caseset_cs* cases, double degree )|
Performs learning of CPT tables from data. For EM or gradient descent algorithms this is done until a termination condition is met.
learner is the learner object that performs the learning steps. Construct it with NewLearner_bn.
nodes is the list of nodes whose experience and conditional probability tables are to be updated by learning. They must all be from the same net. Other nodes in that net will not be modified.
cases is the set of cases to be used for learning.
degree is the frequency factor to apply to each case in the case set. It must be greater than zero. It gets multiplied by the "NumCases" (multiplicity number) which appears for each case in the file (if the number doesn't appear in the file, it is taken as 1).
When you create the learner_bn (see NewLearner_bn), you choose the algorithm you wish, which may be one of:
1. Counting Learning
Because this learning method is not iterative, SetLearnerMaxIters_bn and SetLearnerMaxTol_bn have no affect on it.
2. EM Learning
3. Gradient Descent Learning
After the Learner is created, you can set the termination conditions for it. For both EM learning and gradient descent learning, the two possible termination conditions are the maximum number of iterations of the whole batch of cases (see SetLearnerMaxIters_bn), and the minimum change in log likelihood from one pass through the batch to the next (see SetLearnerMaxTol_bn). Termination will occur when either of the two conditions are met. For Counting learning, there currently are no termination conditions to set.
|NewLearner_bn||Creates the learner|
|SetLearnerMaxIters_bn||Sets a learning termination parameter: the maximum number of batch iterations|
|SetLearnerMaxTol_bn||Sets a learning termination parameter: the minimum log likelihood increase|
|NewCaseset_cs||Creates the caseset_cs|
|ReviseCPTsByCaseFile_bn||Uses a different learning algorithm (better suited if there is little missing data)|
|DeleteNodeTables_bn||May want to do this before learning|