next up previous contents
Next: Overview of options for Up: Bayesian Network Classifiers in Previous: Distribution learning   Contents

Running from the command line

These are the command line options of BayesNet.

General options:

-t <name of training file>
        Sets training file.
-T <name of test file>
        Sets test file. If missing, a cross-validation will be performed on the 
        training data.
-c <class index>
        Sets index of class attribute (default: last).
-x <number of folds>
        Sets number of folds for cross-validation (default: 10).
        Do not perform any cross validation.
-split-percentage <percentage>
        Sets the percentage for the train/test set split, e.g., 66.
        Preserves the order in the percentage split.
-s <random number seed>
        Sets random number seed for cross-validation or percentage split
        (default: 1).
-m <name of file with cost matrix>
        Sets file with cost matrix.
-l <name of input file>
        Sets model input file. In case the filename ends with '.xml',
        the options are loaded from the XML file.
-d <name of output file>
        Sets model output file. In case the filename ends with '.xml',
        only the options are saved to the XML file, not the model.
        Outputs no statistics for training data.
        Outputs statistics only, not the classifier.
        Outputs detailed information-retrieval statistics for each class.
        Outputs information-theoretic statistics.
-p <attribute range>
        Only outputs predictions for test instances (or the train
        instances if no test instances provided), along with attributes
        (0 for none).
        Outputs the distribution instead of only the prediction
        in conjunction with the '-p' option (only nominal classes).
        Only outputs cumulative margin distribution.
        Only outputs the graph representation of the classifier.
-xml filename | xml-string
        Retrieves the options from the XML-data instead of the command line.

Options specific to weka.classifiers.bayes.BayesNet:

        Do not use ADTree data structure

-B <BIF file>
        BIF file to compare with

        Search algorithm

        Estimator algorithm

The search algorithm option -Q and estimator option -E options are mandatory.

Note that it is important that the -E options should be used after the -Q option. Extra options can be passed to the search algorithm and the estimator after the class name specified following '-'.

For example:

java weka.classifiers.bayes.BayesNet -t iris.arff -D \
  -Q -- -P 2 -S ENTROPY \
  -E -- -A 1.0


Remco Bouckaert 2008-05-12