1mlpack_softmax_regression(1)General Commands Manualmlpack_softmax_regression(1)
2
3
4
6 mlpack_softmax_regression - softmax regression
7
9 mlpack_softmax_regression [-h] [-v]
10
12 This program performs softmax regression, a generalization of logistic
13 regression to the multiclass case, and has support for L2 regulariza‐
14 tion. The program is able to train a model, load an existing model, and
15 give predictions (and optionally their accuracy) for test data.
16
17 Training a softmax regression model is done by giving a file of train‐
18 ing points with --training_file (-t) and their corresponding labels
19 with --labels_file (-l). The number of classes can be manually speci‐
20 fied with the --number_of_classes (-n) option, and the maximum number
21 of iterations of the L-BFGS optimizer can be specified with the
22 --max_iterations (-M) option. The L2 regularization constant can be
23 specified with --lambda (-r), and if an intercept term is not desired
24 in the model, the --no_intercept (-N) can be specified.
25
26 The trained model can be saved to a file with the --output_model_file
27 (-m) option. If training is not desired, but only testing is, a model
28 can be loaded with the --input_model_file (-i) option. At the current
29 time, a loaded model cannot be trained further, so specifying both -i
30 and -t is not allowed.
31
32 The program is also able to evaluate a model on test data. A test
33 dataset can be specified with the --test_data (-T) option. Class pre‐
34 dictions will be saved in the file specified with the --predic‐
35 tions_file (-p) option. If labels are specified for the test data, with
36 the --test_labels (-L) option, then the program will print the accuracy
37 of the predictions on the given test set and its corresponding labels.
38
40 --help (-h)
41 Default help info.
42
43 --info [string]
44 Get help on a specific module or option. Default value ''.
45 --input_model_file (-m) [string] File containing existing model
46 (parameters). Default value ''.
47
48 --labels_file (-l) [string]
49 A file containing labels (0 or 1) for the points in the training
50 set (y). The labels must order as a row. Default value ''.
51
52 --lambda (-r) [double]
53 L2-regularization constant Default value 0.0001.
54
55 --max_iterations (-n) [int]
56 Maximum number of iterations before termination. Default value
57 400.
58
59 --no_intercept (-N)
60 Do not add the intercept term to the model. --number_of_classes
61 (-c) [int] Number of classes for classification; if unspecified
62 (or 0), the number of classes found in the labels will be used.
63 Default value 0.
64
65 --test_data (-T) [string]
66 File containing test dataset. Default value ’'.
67
68 --test_labels (-L) [string]
69 File containing test labels. Default value ''. --training_file
70 (-t) [string] A file containing the training set (the matrix of
71 predictors, X). Default value ''.
72
73 --verbose (-v)
74 Display informational messages and the full list of parameters
75 and timers at the end of execution.
76
77 --version (-V)
78 Display the version of mlpack.
79
81 --output_model_file (-M) [string] File to save trained softmax regres‐
82 sion model to. Default value ''. --predictions_file (-p) [string] File
83 to save predictions for test dataset into. Default value ''.
84
87 For further information, including relevant papers, citations, and the‐
88 ory, For further information, including relevant papers, citations, and
89 theory, consult the documentation found at http://www.mlpack.org or
90 included with your consult the documentation found at
91 http://www.mlpack.org or included with your DISTRIBUTION OF MLPACK.
92 DISTRIBUTION OF MLPACK.
93
94
95
96 mlpack_softmax_regression(1)