<-i <string» | Comma-separated input .mln files. (With the -multipleDatabases option, the second file to the last one are used to contain constants from different databases, and they correspond to the .db files specified with the -t option.) |
[-cw <string>] | Specified non-evidence atoms (comma-separated with no space) are closed world, otherwise, all non-evidence atoms are open world. Atoms appearing here cannot be query atoms and cannot appear in the -o option. |
[-ow <string>] | Specified evidence atoms (comma-separated with no space) are open world, while other evidence atoms are closed-world. Atoms appearing here cannot appear in the -c option. |
[-infer <string>] | Specified inference parameters when using discriminative learning. The arguments are to be encapsulated in "" and the syntax is identical to the infer command (run infer with no commands to see this). If not specified, MaxWalkSat with default parameters is used. |
[-d [bool]] | Discriminative weight learning. |
[-g [bool]] | Generative weight learning. |
<-o <string» | Output .mln file containing formulas with learned weights. |
<-t <string» | Comma-separated .db files containing the training database (of true/false ground atoms), including function definitions, e.g. ai.db,graphics.db,languages.db. |
[-ne <string>] | First-order non-evidence predicates (comma-separated with no space), e.g., cancer,smokes,friends. For discriminative learning, at least one non-evidence predicate must be specified. For generative learning, the specified predicates are included in the (weighted) pseudo-log-likelihood computation; if none are specified, all are included. |
[-noAddUnitClauses [bool]] | If specified, unit clauses are not included in the .mln file; otherwise they are included. |
[-multipleDatabases [bool]] | If specified, each .db file belongs to a separate database; otherwise all .db files belong to the same database. |
[-withEM [bool]] | If set, EM is used to fill in missing truth values; otherwise missing truth values are set to false. |
[-dNumIter <integer>] | [200] (For discriminative learning only.) Number of iterations to run voted perceptron. |
[-dLearningRate <double>] | [0.001] (For discriminative learning only) Learning rate for the gradient descent in voted perceptron algorithm. |
[-dMomentum <double>] | [0.0] (For discriminative learning only) Momentum term for the gradient descent in voted perceptron algorithm. |
|
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.