ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 19 May 2017 My Price 9.00

COMP 652: Machine Learning

I need help with this assignment.. the same assignment my prof. use it.. machine learning .. please i need help 

 

COMP 652: Machine Learning - Assignment 1Posted Wednesday, September 9, 2009Due Wednesday, September 16, 20091.Linear and polynomial regression [65 points]For this exercise, you will experiment in Matlab with linear and polynomial regression on a givendata set. The inputs are in the filehw1x.datand the desired outputs inhw1y.dat.(a) [5 points] Load the data into memory and plot it (using the load and plot functions; use thehelp function if you do not know how to call them).(b) [5 points] Add a column vector of 1s to the inputs, then use the linear regression formuladiscussed in class to obtain a weight vectorw. Plot both the linear regression line and thedata on the same graph. (Note: matrix formulas translate almost verbatim in Matlab)(c) [5 points] Write a Matlab function that will evaluate the training error of the resulting fit, andreport what this error is.(d) [5 points] Write a Matlab function called PolyRegress(x,y,d) which adds the featuresx2,x3,. . .xdto the inputs and performs polynomial regression.(e) [5 points] Use your function to get a quadratic fit of the data. Plot the data and the fit. Reportthe training error. Is this a better fit?(f) [5 points] Repeat the previous exercise for a cubic fit.(g) [5 points] Suppose that the data were sorted in increasing value of the target variabley, andyou simply partitioned it by putting the firstm/kexamples in the first fold, the next ones inthe second fold, etc. Explain what would happen if you tried to perform cross-validation withthese folds.(h) [10 points] Write a procedure that performs five-fold cross-validation on your data. Use itto determine the best degree for polynomial regression. Show the data that supports yourconclusion, and explain how you have come to this conclusion. For the best fit, plot the dataand the polynomial obtained.(i) [10 points] Change the Matlab code such that you normalize the input data in each columnby the maximum the maximum value in that column. What is the best degree for polynomialregression now? Justify your answer.(j) [10 points] As you witnessed, polynomial regression often causes the features to get extremevalues, which may cause numerical problems. In such cases, it can be helpful to normalizethe features, e.g. by dividing the value of each featurexjbymaxixi,j, like you did in theexample above. Prove that this change results in a scaling of the output, but has no othereffect on the approximator.1

Attachments:

Answers

(11)
Status NEW Posted 19 May 2017 03:05 AM My Price 9.00

-----------

Not Rated(0)