mlpack_softmax_regression(1) softmax regression

SYNOPSIS


mlpack_softmax_regression [-h] [-v] [-m string] [-l string] [-r double] [-n int] [-N] [-c int] [-M string] [-p string] [-T string] [-L string] [-t string] -V

DESCRIPTION

This program performs softmax regression, a generalization of logistic regression to the multiclass case, and has support for L2 regularization. The program is able to train a model, load an existing model, and give predictions (and optionally their accuracy) for test data.

Training a softmax regression model is done by giving a file of training points with --training_file (-t) and their corresponding labels with --labels_file (-l). The number of classes can be manually specified with the --number_of_classes (-n) option, and the maximum number of iterations of the L-BFGS optimizer can be specified with the --max_iterations (-M) option. The L2 regularization constant can be specified with --lambda (-r), and if an intercept term is not desired in the model, the --no_intercept (-N) can be specified.

The trained model can be saved to a file with the --output_model (-m) option. If training is not desired, but only testing is, a model can be loaded with the --input_model (-i) option. At the current time, a loaded model cannot be trained further, so specifying both -i and -t is not allowed.

The program is also able to evaluate a model on test data. A test dataset can be specified with the --test_data (-T) option. Class predictions will be saved in the file specified with the --predictions_file (-p) option. If labels are specified for the test data, with the --test_labels (-L) option, then the program will print the accuracy of the predictions on the given test set and its corresponding labels.

OPTIONS

--help (-h)
Default help info.
--info [string]
Get help on a specific module or option. Default value ''. --input_model_file (-m) [string] File containing existing model (parameters). Default value ''.
--labels_file (-l) [string]
A file containing labels (0 or 1) for the points in the training set (y). The labels must order as a row Default value ''.
--lambda (-r) [double]
L2-regularization constant Default value 0.0001.
--max_iterations (-n) [int]
Maximum number of iterations before termination. Default value 400.
--no_intercept (-N)
Do not add the intercept term to the model. --number_of_classes (-c) [int] Number of classes for classification; if unspecified (or 0), the number of classes found in the labels will be used. Default value 0. --output_model_file (-M) [string] File to save trained softmax regression model to. Default value ''. --predictions_file (-p) [string] File to save predictions for test dataset into. Default value ''.
--test_data (-T) [string]
File containing test dataset. Default value ''.
--test_labels (-L) [string]
File containing test labels. Default value ''. --training_file (-t) [string] A file containing the training set (the matrix of predictors, X). Default value ''.
--verbose (-v)
Display informational messages and the full list of parameters and timers at the end of execution.
--version (-V)
Display the version of mlpack.

ADDITIONAL INFORMATION

ADDITIONAL INFORMATION

For further information, including relevant papers, citations, and theory, For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your consult the documentation found at http://www.mlpack.org or included with your DISTRIBUTION OF MLPACK. DISTRIBUTION OF MLPACK.