1mlpack_lars(1) General Commands Manual mlpack_lars(1)
2
3
4
6 mlpack_lars - lars
7
9 mlpack_lars [-h] [-v]
10
12 An implementation of LARS: Least Angle Regression (Stagewise/laSso).
13 This is a stage-wise homotopy-based algorithm for L1-regularized linear
14 regression (LASSO) and L1+L2-regularized linear regression (Elastic
15 Net).
16
17 This program is able to train a LARS/LASSO/Elastic Net model or load a
18 model from file, output regression predictions for a test set, and save
19 the trained model to a file. The LARS algorithm is described in more
20 detail below:
21
22 Let X be a matrix where each row is a point and each column is a dimen‐
23 sion, and let y be a vector of targets.
24
25 The Elastic Net problem is to solve
26
27 min_beta 0.5 || X * beta - y ||_2^2 + lambda_1 ||beta||_1 +
28 0.5 lambda_2 ||beta||_2^2
29
30 If --lambda1 > 0 and --lambda2 = 0, the problem is the LASSO. If
31 --lambda1 > 0 and --lambda2 > 0, the problem is the Elastic Net. If
32 --lambda1 = 0 and --lambda2 > 0, the problem is ridge regression. If
33 --lambda1 = 0 and --lambda2 = 0, the problem is unregularized linear
34 regression.
35
36 For efficiency reasons, it is not recommended to use this algorithm
37 with --lambda_1 = 0. In that case, use the 'linear_regression' program,
38 which implements both unregularized linear regression and ridge regres‐
39 sion.
40
41 To train a LARS/LASSO/Elastic Net model, the --input_file and
42 --responses_file parameters must be given. The --lambda1 --lambda2, and
43 --use_cholesky arguments control the training parameters. A trained
44 model can be saved with the --output_model_file, or, if training is not
45 desired at all, a model can be loaded with --input_model_file. Any out‐
46 put predictions from a test file can be saved into the file specified
47 by the --output_predictions option.
48
50 --help (-h)
51 Default help info.
52
53 --info [string]
54 Get help on a specific module or option. Default value ''.
55
56 --input_file (-i) [string]
57 File containing covariates (X). Default value ’'.
58 --input_model_file (-m) [string] File to load model from.
59 Default value ''.
60
61 --lambda1 (-l) [double]
62 Regularization parameter for l1-norm penalty. Default value 0.
63
64 --lambda2 (-L) [double]
65 Regularization parameter for l2-norm penalty. Default value 0.
66 --responses_file (-r) [string] File containing y
67 (responses/observations). Default value ''.
68
69 --test_file (-t) [string]
70 File containing points to regress on (test points). Default
71 value ''.
72
73 --use_cholesky (-c)
74 Use Cholesky decomposition during computation rather than
75 explicitly computing the full Gram matrix.
76
77 --verbose (-v)
78 Display informational messages and the full list of parameters
79 and timers at the end of execution.
80
81 --version (-V)
82 Display the version of mlpack.
83
85 --output_model_file (-M) [string] File to save model to. Default value
86 ''. --output_predictions_file (-o) [string] If --test_file is speci‐
87 fied, this file is where the predicted responses will be saved. Default
88 value ''.
89
92 For further information, including relevant papers, citations, and the‐
93 ory, For further information, including relevant papers, citations, and
94 theory, consult the documentation found at http://www.mlpack.org or
95 included with your consult the documentation found at
96 http://www.mlpack.org or included with your DISTRIBUTION OF MLPACK.
97 DISTRIBUTION OF MLPACK.
98
99
100
101 mlpack_lars(1)