Machine Learning Programming Exercise 5: 1 Bias and Variance
This document provides instructions for a machine learning programming exercise due on December 14th, 2015. It involves analyzing bias and variance for a linear regression problem using data in ex5_x.dat and ex5_y.dat files. The task is to: 1) Perform linear regression without regularization using 80% of data for training, 2) Add polynomial features up to x^6, choose best degree using cross-validation error, and report test error, 3) Fix polynomial degree, find best regularization parameter lambda using cross-validation error, and report final test error.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
20 views1 page
Machine Learning Programming Exercise 5: 1 Bias and Variance
This document provides instructions for a machine learning programming exercise due on December 14th, 2015. It involves analyzing bias and variance for a linear regression problem using data in ex5_x.dat and ex5_y.dat files. The task is to: 1) Perform linear regression without regularization using 80% of data for training, 2) Add polynomial features up to x^6, choose best degree using cross-validation error, and report test error, 3) Fix polynomial degree, find best regularization parameter lambda using cross-validation error, and report final test error.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
Machine Learning Programming Exercise 5
Due 14th December, 2015. Please upload to LMS before midnight.
1 Bias and Variance [100 points]
The ex5_x.dat and ex5_y.dat contain the inputs ( () ) and outputs ( () ) for linear regression problem. Use part of your data to train your model and then test your results. For this purpose, use 60% of the data as training set, 20% of the data as cross validation set and use the rest of the data as test set. i. [10 points] Perform a linear regression without regularization (using 80% of the data as training set). Calculate the error using the test set. ii. [45 points] Add polynomial features up to x^6 for your regression model. For different degrees of the polynomial, calculate optimal theta on the training set. Plot degree vs. error that you obtain using cross validation set and the corresponding thetas. Choose the best degree using this plot and then calculate test set error. iii. [45 points] This time fix your degree of the polynomial to the value you obtained in the second part of the assignment. Find best regularization parameter in the same way you do in (ii). Here plot lambda vs. error. Report test error for the best lambda.