Man page - mlpack_softmax_regression(1)
Packages contains this manual
- mlpack_fastmks(1)
- mlpack_mean_shift(1)
- mlpack_hmm_generate(1)
- mlpack_local_coordinate_coding(1)
- mlpack_sparse_coding(1)
- mlpack_preprocess_scale(1)
- mlpack_kmeans(1)
- mlpack_linear_svm(1)
- mlpack_preprocess_split(1)
- mlpack_softmax_regression(1)
- mlpack_hmm_train(1)
- mlpack_nca(1)
- mlpack_range_search(1)
- mlpack_radical(1)
- mlpack_gmm_generate(1)
- mlpack_cf(1)
- mlpack_random_forest(1)
- mlpack_lmnn(1)
- mlpack_gmm_probability(1)
- mlpack_emst(1)
- mlpack_dbscan(1)
- mlpack_nbc(1)
- mlpack_preprocess_one_hot_encoding(1)
- mlpack_lsh(1)
- mlpack_knn(1)
- mlpack_kde(1)
- mlpack_hoeffding_tree(1)
- mlpack_adaboost(1)
- mlpack_hmm_loglik(1)
- mlpack_nmf(1)
- mlpack_pca(1)
- mlpack_bayesian_linear_regression(1)
- mlpack_hmm_viterbi(1)
- mlpack_preprocess_describe(1)
- mlpack_decision_tree(1)
- mlpack_krann(1)
- mlpack_det(1)
- mlpack_lars(1)
- mlpack_preprocess_binarize(1)
- mlpack_logistic_regression(1)
- mlpack_gmm_train(1)
- mlpack_perceptron(1)
- mlpack_preprocess_imputer(1)
- mlpack_kernel_pca(1)
- mlpack_kfn(1)
- mlpack_linear_regression(1)
- mlpack_approx_kfn(1)
apt-get install mlpack-bin
Manual
mlpack_softmax_regression
NAMESYNOPSIS
DESCRIPTION
OPTIONAL INPUT OPTIONS
OPTIONAL OUTPUT OPTIONS
ADDITIONAL INFORMATION
NAME
mlpack_softmax_regression - softmax regression
SYNOPSIS
mlpack_softmax_regression [ -m unknown ] [ -l unknown ] [ -r double ] [ -n int ] [ -N bool ] [ -c int ] [ -T unknown ] [ -L unknown ] [ -t unknown ] [ -V bool ] [ -M unknown ] [ -p unknown ] [ -P unknown ] [ -h -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 the ’ --training_file ( -t )’ parameter and their corresponding labels with the ’ --labels_file ( -l )’ parameter. The number of classes can be manually specified with the ’ --number_of_classes ( -c )’ parameter, and the maximum number of iterations of the L-BFGS optimizer can be specified with the ’ --max_iterations ( -n )’ parameter. The L2 regularization constant can be specified with the ’ --lambda ( -r )’ parameter and if an intercept term is not desired in the model, the ’ --no_intercept ( -N )’ parameter can be specified.
The trained model can be saved with the ’ --output_model_file ( -M )’ output parameter. If training is not desired, but only testing is, a model can be loaded with the ’ --input_model_file ( -m )’ parameter. At the current time, a loaded model cannot be trained further, so specifying both ’ --input_model_file ( -m )’ and ’ --training_file ( -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_file ( -T )’ parameter. Class predictions can be saved with the ’ --predictions_file ( -p )’ output parameter. If labels are specified for the test data with the ’ --test_labels_file ( -L )’ parameter, then the program will print the accuracy of the predictions on the given test set and its corresponding labels.
For example, to train a softmax regression model on the data ’dataset.csv’ with labels ’labels.csv’ with a maximum of 1000 iterations for training, saving the trained model to ’sr_model.bin’, the following command can be used:
$ mlpack_softmax_regression --training_file dataset.csv --labels_file labels.csv --output_model_file sr_model.bin
Then, to use ’sr_model.bin’ to classify the test points in ’test_points.csv’, saving the output predictions to ’predictions.csv’, the following command can be used:
$ mlpack_softmax_regression --input_model_file sr_model.bin --test_file test_points.csv --predictions_file predictions.csv
OPTIONAL INPUT OPTIONS
--help (-h) [ bool ]
Default help info.
--info [string]
Print help on a specific option. Default value ’’.
--input_model_file (-m) [ unknown ]
File containing existing model (parameters). --labels_file ( -l ) [ unknown ] A matrix containing labels (0 or 1) for the points in the training set (y). The labels must order as a row.
--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) [ bool ]
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.
--test_file (-T) [ unknown ]
Matrix containing test dataset.
--test_labels_file (-L) [ unknown ]
Matrix containing test labels.
--training_file (-t) [ unknown ]
A matrix containing the training set (the matrix of predictors, X).
--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_model_file (-M) [ unknown ]
File to save trained softmax regression model to.
--predictions_file (-p) [ unknown ]
Matrix to save predictions for test dataset into.
--probabilities_file (-P) [ unknown ]
Matrix to save class probabilities for test dataset into.
ADDITIONAL INFORMATION
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.