HW6 - (Computer Exercise Faculty of Computers and...

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: (Computer Exercise) Faculty of Computers and Information Faculty Department of Computer Science Pattern Recognition A First Simulation Example on Designing and Assessing a Regression Function (cont.) • Similar to the previous simulation on linear model, this time assume that Y is related to X as follows Y = sin X + ε, 2 where X is uniformally distributed in [−π, π ]; and ε ∼ N (0, 0.1). Notice that, in this case σY |X is constant. • Build different models, intercept, first order, second order, . . ., pth order. • For each model generate the following figures: – a figure showing the true model, E Y |X = sin X , along with the 500 fits. 2 – a figure showing (vs. ntr ): the risk of the true model Ex0 σY |X =x0 , the average bias Ex0 Bias2 (y0 , y0 ), the average variance Ex0 Vartr (y0 ), and the mean error Ex0 Etr errtr (x0 ) = Etr Ex0 errtr (x0 ) = Etr errtr ; verify that 2 E errtr = E σY |X =x0 + E Bias2 (y0 , y0 ) + E Var (y0 ) . x0 x0 x0 tr tr • For each ntr , generate a figure (vs. the complexity p), that shows the L.H.S and the three terms of the R.H.S. of the equation above. • For each ntr , what is the best model for this problem? ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online