Y a quadratic function with some random variation

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t; - nr(0,,) > y< x205xrom20003 > - ^-.*+nr(0,,.) > xet< rom5,,) > ts - nr(011 > yet< xet205xetrom5,,.) > ts - ts^-.*ts+nr(0003 > p < l(~) > 1 - myx > p < l( ~pl(,) > 2 - my oyx2) > p < l( ~pl(,0) > n - my oyx1) > pi< l(~(i()+(o()) >s - myIsnx)Icsx) xvalues for the training set are based on a distribution, while the test set has a values are determined by distribution. y , a quadratic function with some random variation. Polynomial least square fits of degree 1, 2, and 10 are calculated, as well as a fit of > >#cluaetema surderro dge 1pl > aclt h en qae ro f ere oy > >sm(-rdc(1dt.rm())2/eghy > u(ypeitp,aafaex)^)lnt() > 1564 >1 .702 > >sm(ts-rdc(1dt.rm(=ts))2/eghyet > u(yetpeitp,aafaexxet)^)lnt(ts) > 7771 >1 .265 . P olynomial fits to curved data set. Training and test mean squared errors for the linear fit. These are both quite high - and since the data is non- linear, the different mean value of the test data increases the error quite a bit. > >#cluaetema surderro dge 2pl > aclt h en qae ro f ere oy > >sm(-rdc(2dt.rm())2/eghy > u(ypeitp,aafaex)^)lnt() > 00686 >1 .8047 > >sm(ts-rdc(2dt.rm(=ts))2/eghyet > u(yetpeitp,aafaexxet)^)lnt(ts) > 00473 >1 .8042 This fit is far better - and there is not much difference between the training and test error, either. > >#cluaetema surderro dge 1 pl > aclt h en qae ro f ere 0 oy > >sm(-rdc(ndt.rm())2/eghy > u(ypeitp,aafaex)^)lnt() > 00975 >1 .7658 > >sm(ts-rdc(ndt.rm(=ts))2/eghyet > u(yetpeitp,aafaexxet)^)lnt(ts) > 1673 >1 5.19 With a high- degree polynomial, the training error continues to decrease, but not by much - and the test set error has risen again. The overfitting makes it a poor predictor. As the degree of the polynomial rises further, the accuracy of the computer becomes an issue - and a good fit is not even consistently produced for the training data. > >#cluaemeo sncsft > aclt s f...
View Full Document

This document was uploaded on 03/07/2014.

Ask a homework question - tutors are online