Bayesian Linear Regression
Updated: March 15, 2017
Creates a Bayesian linear regression model
Category: Machine Learning / Initialize Model / Regression
You can use the Bayesian Linear Regression module to create a regression model based on Bayesian statistics.
After you have configured the model, you must train the model using a tagged dataset and the Train Model module. The trained model can then be used to make predictions. Alternatively, the untrained model can be passed to Cross-Validate Model for cross-validation against a labeled data set.
In statistics, the Bayesian approach to regression is often contrasted with the frequentist approach.
The Bayesian approach uses linear regression supplemented by additional information in the form of a prior probability distribution. Prior information about the parameters is combined with a likelihood function to generate estimates for the parameters.
In contrast, the frequentist approach, represented by standard least-square linear regression, assumes that the data contains sufficient measurements to create a meaningful model.
For more information about the research behind this algorithm, see the links in the Technical Notes section.
Add the Bayesian Linear Regression module to your experiment.
For Regularization weight, type a value to use for regularization. Regularization is used to prevent overfitting.
This weight corresponds to L2. For more information, see the Technical Notes section.
Select the Allow unknown categorical levels option to create a grouping for unknown values.
If you deselect it, the model can accept only the values contained in the training data. In the former case, the model might be less precise on known values but provide better predictions for new (unknown) values.
Connect a tagged dataset. Connect the Train Model module and select the single numeric column that you want to model or predict.
You can train a model using Tune Model Hyperparameters but it will have no effect since no model parameters can be varied.
Run the experiment.
When the model is trained, right-click the output of the Train Model module and select Visualize to see a summary of the model's parameters.
You can also use the trained model as an input to Score Model to create predictions.
For examples of regression models, see these sample experiments in the Cortana Intelligence Gallery:
- The Compare Regression Models sample contrasts several different kinds of regression models.
The use of the lambda coefficient is described in detail in this textbook on machine learning: Pattern Recognition and Machine Learning, Christopher Bishop, Springer-Verlag, 2007.
This article is available as a PDF download from the Microsoft Research site: Bayesian Regression and Classification
| Name | Range | Type | Default | Description |
|---|---|---|---|---|
| Regularization weight | >=double.Epsilon | Float | 1.0 | Type a constant to use in regularization. The constant represents the ratio of the precision of weight prior to the precision of noise. |
| Allow unknown categorical levels | Any | Boolean | true | If true creates an additional level for each categorical column. Any levels in the test dataset not available in the training dataset are mapped to this additional level. |
| Name | Type | Description |
|---|---|---|
| Untrained model | ILearner interface | An untrained Bayesian linear regression model |