.\" Text automatically generated by txt2man .TH mlpack_bayesian_linear_regression 1 "11 January 2024" "mlpack-4.3.0" "User Commands" .SH NAME \fBmlpack_bayesian_linear_regression \fP- bayesianlinearregression .SH SYNOPSIS .nf .fam C \fBmlpack_bayesian_linear_regression\fP [\fB-c\fP \fIbool\fP] [\fB-i\fP \fIunknown\fP] [\fB-m\fP \fIunknown\fP] [\fB-r\fP \fIunknown\fP] [\fB-s\fP \fIbool\fP] [\fB-t\fP \fIunknown\fP] [\fB-V\fP \fIbool\fP] [\fB-M\fP \fIunknown\fP] [\fB-o\fP \fIunknown\fP] [\fB-u\fP \fIunknown\fP] [\fB-h\fP \fB-v\fP] .fam T .fi .fam T .fi .SH 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. .PP 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. .PP To train a BayesianLinearRegression model, the '\fB--input_file\fP (\fB-i\fP)' and \(cq\fB--responses_file\fP (\fB-r\fP)'parameters must be given. The '\fB--center\fP (\fB-c\fP)'and \(cq\fB--scale\fP (\fB-s\fP)' parameters control the centering and the normalizing options. A trained model can be saved with the '\fB--output_model_file\fP (\fB-M\fP)'. If no training is desired at all, a model can be passed via the '\fB--input_model_file\fP (\fB-m\fP)' parameter. .PP 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 \(cq\fB--test_file\fP (\fB-t\fP)' parameter. Predicted responses to the test points can be saved with the '\fB--predictions_file\fP (\fB-o\fP)' output parameter. The corresponding standard deviation can be save by precising the '\fB--stds_file\fP (\fB-u\fP)' parameter. .PP 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 \(cqblr_model.bin': .PP $ \fBmlpack_bayesian_linear_regression\fP \fB--input_file\fP data.csv \fB--responses_file\fP responses.csv \fB--center\fP \fB--scale\fP \fB--output_model_file\fP blr_model.bin .PP 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': .PP $ \fBmlpack_bayesian_linear_regression\fP \fB--input_model_file\fP blr_model.bin \fB--test_file\fP test.csv \fB--predictions_file\fP test_predictions.csv .PP Because the estimator computes a predictive distribution instead of a simple point estimate, the '\fB--stds_file\fP (\fB-u\fP)' parameter allows one to save the prediction uncertainties: .PP $ \fBmlpack_bayesian_linear_regression\fP \fB--input_model_file\fP blr_model.bin \fB--test_file\fP test.csv \fB--predictions_file\fP test_predictions.csv \fB--stds_file\fP stds.csv .RE .PP .SH OPTIONAL INPUT OPTIONS .TP .B \fB--center\fP (\fB-c\fP) [\fIbool\fP] Center the data and fit the intercept if enabled. .TP .B \fB--help\fP (\fB-h\fP) [\fIbool\fP] Default help info. .TP .B \fB--info\fP [string] Print help on a specific option. Default value ''. .TP .B \fB--input_file\fP (\fB-i\fP) [\fIunknown\fP] Matrix of covariates (X). .TP .B \fB--input_model_file\fP (\fB-m\fP) [\fIunknown\fP] Trained BayesianLinearRegression model to use. .TP .B \fB--responses_file\fP (\fB-r\fP) [\fIunknown\fP] Matrix of responses/observations (y). .TP .B \fB--scale\fP (\fB-s\fP) [\fIbool\fP] Scale each feature by their standard deviations if enabled. .TP .B \fB--test_file\fP (\fB-t\fP) [\fIunknown\fP] Matrix containing points to regress on (test points). .TP .B \fB--verbose\fP (\fB-v\fP) [\fIbool\fP] Display informational messages and the full list of parameters and timers at the end of execution. .TP .B \fB--version\fP (\fB-V\fP) [\fIbool\fP] Display the version of mlpack. .SH OPTIONAL OUTPUT OPTIONS .TP .B \fB--output_model_file\fP (\fB-M\fP) [\fIunknown\fP] Output BayesianLinearRegression model. .TP .B \fB--predictions_file\fP (\fB-o\fP) [\fIunknown\fP] If \fB--test_file\fP is specified, this file is where the predicted responses will be saved. .TP .B \fB--stds_file\fP (\fB-u\fP) [\fIunknown\fP] If specified, this is where the standard deviations of the predictive distribution will be saved. .SH ADDITIONAL INFORMATION 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.