# For example, the following command trains a model on the data "data" and
# responses "responses"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":
#
# \dontrun{
# output <- bayesian_linear_regression(input=data, responses=responses,
# center=1, scale=0)
# blr_model <- output$output_model
# }
#
# The following command uses the "blr_model" to provide predicted responses
# for the data "test" and save those responses to "test_predictions":
#
# \dontrun{
# output <- bayesian_linear_regression(input_model=blr_model, test=test)
# test_predictions <- output$predictions
# }
#
# Because the estimator computes a predictive distribution instead of a
# simple point estimate, the "stds" parameter allows one to save the
# prediction uncertainties:
#
# \dontrun{
# output <- bayesian_linear_regression(input_model=blr_model, test=test)
# test_predictions <- output$predictions
# stds <- output$stds
# }
Run the code above in your browser using DataLab