Bayesian Polynomial Curve Fitting

An implementation of the example from Bishop, Pattern Recognition and Machine Learning, 2006
346 Downloads
Updated 31 Aug 2018

View License

This code implements the Bayesian curve fitting example in Section 1.2.6 of [1], where a D-degree polynomial is sequentially fitted to N data points generated from a sine function. The output is a plot of the predictive distribution and the mean estimate of the fitted polynomial. Various parameters, i.e. alpha, beta, in the code can be modified to see their effect to the fit.

You have the option to output as GIF as well.

Reference:
[1] Bishop, Pattern Recognition and Machine Learning, 2006.

Cite As

Karl Ezra Pilario (2026). Bayesian Polynomial Curve Fitting (https://uk.mathworks.com/matlabcentral/fileexchange/68675-bayesian-polynomial-curve-fitting), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0