mlpack_bayesian_linear_regression(1)

NAME
mlpack_bayesian_linear_regression - bayesianlinearregression

SYNOPSIS
 mlpack_bayesian_linear_regression [-c bool] [-i string] [-m unknown] [-r string] [-s bool] [-t string] [-V bool] [-M unknown] [-o string] [-u string] [-h -v]

DESCRIPTION
An implementation of the bayesian linear regression. This model is a probabilistic view and implementation of the linear regression. The final solution is obtained by computing a posterior distribution from gaussian likelihood and a zero mean gaussian isotropic prior distribution on the solution. Optimization is AUTOMATIC and does not require cross validation. The optimization is performed by maximization of the evidence function. Parameters are tuned during the maximization of the marginal likelihood. This procedure includes the Ockham's razor that penalizes over complex solutions.

This program is able to train a Bayesian linear regression model or load a model from file, output regression predictions for a test set, and save the trained model to a file.

To train a BayesianLinearRegression model, the '--input_file (-i)' and ’--responses_file (-r)'parameters must be given. The '--center (-c)'and ’--scale (-s)' parameters control the centering and the normalizing options. A trained model can be saved with the '--output_model_file (-M)'. If no training is desired at all, a model can be passed via the '--input_model_file (-m)' parameter.

The program can also provide predictions for test data using either the trained model or the given input model. Test points can be specified with the ’--test_file (-t)' parameter. Predicted responses to the test points can be saved with the '--predictions_file (-o)' output parameter. The corresponding standard deviation can be save by precising the '--stds_file (-u)' parameter.

For example, the following command trains a model on the data 'data.csv' and responses 'responses.csv'with center set to true and scale set to false (so, Bayesian linear regression is being solved, and then the model is saved to ’blr_model.bin':

$ mlpack_bayesian_linear_regression --input_file data.csv --responses_file responses.csv --center --scale --output_model_file blr_model.bin

The following command uses the 'blr_model.bin' to provide predicted responses for the data 'test.csv' and save those responses to 'test_predictions.csv':

$ mlpack_bayesian_linear_regression --input_model_file blr_model.bin --test_file test.csv --predictions_file test_predictions.csv

Because the estimator computes a predictive distribution instead of a simple point estimate, the '--stds_file (-u)' parameter allows one to save the prediction uncertainties:

$ mlpack_bayesian_linear_regression --input_model_file blr_model.bin --test_file test.csv --predictions_file test_predictions.csv --stds_file stds.csv

OPTIONAL INPUT OPTIONS

--center (-c) [bool]
    Center the data and fit the intercept if enabled.

--help (-h) [bool]
    Default help info.

--info [string]
    Print help on a specific option. Default value ''.

--input_file (-i) [string]
    Matrix of covariates (X).

--input_model_file (-m) [unknown]
    Trained BayesianLinearRegression model to use.

--responses_file (-r) [string]
    Matrix of responses/observations (y).

--scale (-s) [bool]
    Scale each feature by their standard deviations if enabled.

--test_file (-t) [string]
    Matrix containing points to regress on (test points).

--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]
    Output BayesianLinearRegression model.

--predictions_file (-o) [string]
    If --test_file is specified, this file is where the predicted responses will be saved.

--stds_file (-u) [string]
    If specified, this is where the standard deviations of the predictive distribution will be saved.nnADDITIONAL INFORMATIONNN 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.