NORSYS SOFTWARE © 2012 |
NETICA API |
C VERSION 5.04 |

double SetLearnerMaxTol_bn ( | learner_bn* learner, double log_likeli_tol ) |

Sets the tolerance for the minimum change in data log likelihood between consecutive passes through the data, as a termination condition for any learning to be done by learner. This applies to EM_LEARNING and GRADIENT_DESCENT_LEARNING only, since they are iterative by nature. Learning by the COUNTING_LEARNING method is not affected by this function.

When learning is performed, with each iteration (i.e., pass through the complete data set), the "log likelihood" of the data given the net is computed. The log likelihood is the per-case average of the negative of the logarithm of the probability of the case given the current Bayes net (structure + CPTs). When the difference between the computed log-likelihoods for two consecutive passes falls below this tolerance, the algorithm is halted. So, the closer this tolerance is to zero, the longer the algorithm may take.

The algorithm may terminate earlier if another termination condition is met, such as the maximum number of iterations (see SetLearnerMaxIters_bn).

log_likeli_tol must be greater than 0.0 (or QUERY_ns). The default is 1.0e-5.

It returns the previous value of this limit. If QUERY_ns is passed for log_likeli_tol, it just returns the previous value without changing it.

Version:

Versions 2.26 and later have this function.

See also:

NewLearner_bn | Creates the learner_bn | |

SetLearnerMaxIters_bn | Sets another termination parameter | |

LearnCPTs_bn | Performs the learning using this parameter |