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 the "training" parameter and their corresponding labels with the
"labels" parameter. The number of classes can be manually specified with the
"number_of_classes" parameter, and the maximum number of iterations of the
L-BFGS optimizer can be specified with the "max_iterations" parameter. The
L2 regularization constant can be specified with the "lambda" parameter and
if an intercept term is not desired in the model, the "no_intercept"
parameter can be specified.
The trained model can be saved with the "output_model" output parameter. If
training is not desired, but only testing is, a model can be loaded with the
"input_model" parameter. At the current time, a loaded model cannot be
trained further, so specifying both "input_model" and "training" is not
allowed.
The program is also able to evaluate a model on test data. A test dataset
can be specified with the "test" parameter. Class predictions can be saved
with the "predictions" output parameter. If labels are specified for the
test data with the "test_labels" parameter, then the program will print the
accuracy of the predictions on the given test set and its corresponding
labels.