mlpack_decision_stump [-h] [-v] [-b int] [-m string] [-l string] [-M string] [-p string] [-T string] [-t string] -V
This program implements a decision stump, which is a single-level decision tree. The decision stump will split on one dimension of the input data, and will split into multiple buckets. The dimension and bins are selected by maximizing the information gain of the split. Optionally, the minimum number of training points in each bin can be specified with the --bucket_size (-b) parameter.
The decision stump is parameterized by a splitting dimension and a vector of values that denote the splitting values of each bin.
This program enables several applications: a decision tree may be trained or loaded, and then that decision tree may be used to classify a given set of test points. The decision tree may also be saved to a file for later usage.
To train a decision stump, training data should be passed with the --training_file (-t) option, and their corresponding labels should be passed with the --labels_file (-l) option. Optionally, if --labels_file is not specified, the labels are assumed to be the last dimension of the training dataset. The --bucket_size (-b) parameter controls the minimum number of training points in each decision stump bucket.
For classifying a test set, a decision stump may be loaded with the --input_model_file (-m) parameter (useful for the situation where a stump has not just been trained), and a test set may be specified with the --test_file (-T) parameter. The predicted labels will be saved to the file specified with the --predictions_file (-p) parameter.
Because decision stumps are trained in batch, retraining does not make sense and thus it is not possible to pass both --training_file and --input_model_file; instead, simply build a new decision stump with the training data.
A trained decision stump can be saved with the --output_model_file (-M) option. That stump may later be re-used in subsequent calls to this program (or others).
- --bucket_size (-b) [int]
- The minimum number of training points in each decision stump bucket. Default value 6.
- --help (-h)
- Default help info.
- --info [string]
- Get help on a specific module or option. Default value ''. --input_model_file (-m) [string] File containing decision stump model to load. Default value ''.
- --labels_file (-l) [string]
- A file containing labels for the training set. If not specified, the labels are assumed to be the last row of the training data. Default value ''. --output_model_file (-M) [string] File to save trained decision stump model to. Default value ''. --predictions_file (-p) [string] The file in which the predicted labels for the test set will be written. Default value 'predictions.csv'.
- --test_file (-T) [string]
- A file containing the test set. Default value ''. --training_file (-t) [string] A file containing the training set. 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.
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.