mlpack_nbc(1)

NAME
mlpack_nbc - parametric naive bayes classifier

SYNOPSIS
 mlpack_nbc [-I bool] [-m unknown] [-l string] [-T string] [-t string] [-V bool] [-o string] [-M unknown] [--output_probs_file string] [-a string] [-p string] [-h -v]

DESCRIPTION
This program trains the Naive Bayes classifier on the given labeled training set, or loads a model from the given model file, and then may use that trained model to classify the points in a given test set.

The training set is specified with the '--training_file (-t)' parameter. Labels may be either the last row of the training set, or alternately the ’--labels_file (-l)' parameter may be specified to pass a separate matrix of labels.

If training is not desired, a pre-existing model may be loaded with the ’--input_model_file (-m)' parameter.

    The '--incremental_variance (-I)' parameter can be used to force the training to use an incremental algorithm for calculating variance. This is slower, but can help avoid loss of precision in some cases.

    If classifying a test set is desired, the test set may be specified with the ’--test_file (-T)' parameter, and the classifications may be saved with the ’--predictions_file (-a)'predictions parameter. If saving the trained model is desired, this may be done with the '--output_model_file (-M)' output parameter.

    Note: the '--output_file (-o)' and '--output_probs_file' parameters are deprecated and will be removed in mlpack 4.0.0. Use '--predictions_file (-a)' and '--probabilities_file (-p)' instead.

    For example, to train a Naive Bayes classifier on the dataset 'data.csv' with labels 'labels.csv' and save the model to 'nbc_model.bin', the following command may be used:

    $ mlpack_nbc --training_file data.csv --labels_file labels.csv --output_model_file nbc_model.bin

    Then, to use 'nbc_model.bin' to predict the classes of the dataset ’test_set.csv' and save the predicted classes to 'predictions.csv', the following command may be used:

    $ mlpack_nbc --input_model_file nbc_model.bin --test_file test_set.csv --output_file predictions.csv

OPTIONAL INPUT OPTIONS

--help (-h) [bool]
    Default help info.

--incremental_variance (-I) [bool]
    The variance of each class will be calculated incrementally.

--info [string]
    Print help on a specific option. Default value ''.

--input_model_file (-m) [unknown]
    Input Naive Bayes model.

--labels_file (-l) [string]
    A file containing labels for the training set.

--test_file (-T) [string]
    A matrix containing the test set.

--training_file (-t) [string]
    A matrix containing the training set.

--verbose (-v) [bool]
    Display informational messages and the full list of parameters and timers at the end of execution.

--version (-V) [bool]
    Display the version of mlpack.

OPTIONAL OUTPUT OPTIONS

--output_file (-o) [string]
    The matrix in which the predicted labels for the test set will be written (deprecated).

--output_model_file (-M) [unknown]
    File to save trained Naive Bayes model to. --output_probs_file [string] The matrix in which the predicted probability of labels for the test set will be written (deprecated).

--predictions_file (-a) [string]
    The matrix in which the predicted labels for the test set will be written.

--probabilities_file (-p) [string]
    The matrix in which the predicted probability of labels for the test set will be written.nnADDITIONAL INFORMATIONNN FOR FURTHER INFORMATION, INCLUDING RELEVANT PAPERS, CITATIONS, AND THEORY, consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack.