mlpack_linear_regression

NAME

mlpack_linear_regression - simple linear regression and prediction

SYNOPSIS

mlpack_linear_regression [-h] [-v]

DESCRIPTION

An implementation of simple linear regression and simple ridge regression using ordinary least squares. This solves the problem

y = X * b + e

where X (--input_file) and y (the last column of --input_file, or --input_responses) are known and b is the desired variable. If the covariance matrix (X’X) is not invertible, or if the solution is overdetermined, then specify a Tikhonov regularization constant (--lambda) greater than 0, which will regularize the covariance matrix to make it invertible. The calculated b is saved to disk (--output_file).

Optionally, the calculated value of b is used to predict the responses for another matrix X’ (--test_file):

y’ = X’ * b

and these predicted responses, y’, are saved to a file (--output_predictions). This type of regression is related to least-angle regression, which mlpack implements with the ’lars’ executable.

OPTIONAL INPUT OPTIONS

--help (-h) [bool]

Default help info. Default value 0.

--info [string]

Get help on a specific module or option. Default value ’’. --input_model_file (-m) [string] Existing LinearRegression model to use. Default value ’’.

--lambda (-l) [double]

Tikhonov regularization for ridge regression. If 0, the method reduces to linear regression. Default value 0.

--test_file (-T) [string]

Matrix containing X’ (test regressors). Default value ’’. --training_file (-t) [string] Matrix containing training set X (regressors). Default value ’’. --training_responses_file (-r) [string] Optional vector containing y (responses). If not given, the responses are assumed to be the last row of the input file. Default value ’’.

--verbose (-v) [bool]

Display informational messages and the full list of parameters and timers at the end of execution. Default value 0.

--version (-V) [bool]

Display the version of mlpack. Default value

0.

OPTIONAL OUTPUT OPTIONS

--output_model_file (-M) [string] Output LinearRegression model. Default value ’’. --output_predictions_file (-o) [string] If --test_file is specified, this matrix is where the predicted responses will be saved. Default value ’’.

ADDITIONAL INFORMATION

ADDITIONAL INFORMATION

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.