Fitting a polynomial with regularization

As a means of familiarizing myself with Matlab I set out to recreate a number of figures from the book Pattern Recognition and Machine Learning (Bishop, 2006). In the first chapter already I am faced with a challange I cannot seem to get past.
To recreate figure 1.7 I will have to two plot a polynomials (of grade 9) on a training data set with a specific regularization constant, i.e. ln(lamda)=-18 and ln(lamda)=0. The regularization term goes with lambda times the square of the weights, and is added to a simple square-error-function.
Without regularization term I used polyfit and polyval to (re)produce figures. With regualization I cannot use these anymore, and now I am stuck.
Is anybody able and willing to point me in the direction of a solution ?
t.i.a.

3 件のコメント

bio lim
bio lim 2016 年 12 月 3 日
Can you give the code you have written so that we can take a look?
dpb
dpb 2016 年 12 月 3 日
Show the specific model to be fit. Is it linear or nonlinear in the coefficients?
giulgi
giulgi 2017 年 11 月 7 日
Hey, do you have got an code already? I have the same problem as you. I'm also not able to reprocedure the figure with lambda = -18.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

質問済み:

2016 年 12 月 3 日

コメント済み:

2017 年 11 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by