Question: Generate 20 data samples (x, y) such that x is uniformly distributed in [0, 1] interval, and y is normally distributed y ~ N (0,
Generate 20 data samples (x, y) such that x is uniformly distributed in [0, 1] interval, and y is normally distributed y ~ N (0, 0.5). Consider modeling this data as y = f (x) + noise, using polynomial models to estimate unknown f (x). Function POLYFIT in MATLAB performs fitting of polynomial fitting. Use polynomials of degree 1, 3 and 6. Report the fitting error (MSE) for each model, and show it graphically along with the data samples. Briefly discuss whether the small fitting error can be used as a good indicator for small prediction error for such polynomial models (where prediction error ~ MSE error for new samples generated using the same distribution as 20 training samples.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
