next up previous
Next: 6.5 Structure Learning Up: 6 Notes on Code Previous: 6.3 Logic


6.4 Weight Learning

The learnwts directory contains code for learning the weights of formulas. The mainline is in learnwts.cpp. If you do not want to print the clauses as their number of true groundings are being counted during generative learning, you can set the variable PRINT_CLAUSE_DURING_COUNT to false at the top of learnwts.cpp. learnwts.h contains functions used in learnwts.cpp that can be shared with other modules. PseudoLogLikelihood computes the (weighted) pseudo-log-likelihood given the constants in one or more Domains, and clauses in an MLN. LBFGSB is an optimization routine that finds the optimal weights, i.e., the weights that give the highest (weighted) pseudo-log-likelihood. VotedPerceptron contains the algorithm for discriminative learning. IndexTranslator is used to translate between clause weights and the weights that are optimized. It is required when the CNF of a formula is different across multiple databases, e.g., when the formula has existentially quantified variables, or variables with mutually exclusive and exhaustive values.



next up previous
Next: 6.5 Structure Learning Up: 6 Notes on Code Previous: 6.3 Logic
Marc Sumner 2006-06-26