Assignment – 1 (5+1 bonus pts) EECS 4404/5327

$30.00

Download Details:

  • Name: A1-yzxbwj.zip
  • Type: zip
  • Size: 2.77 MB

Category:

Description

Rate this product

Question-0 (Preprocessing)
Remove all row corresponding to the labeled winery 3. After this process, you should have only 2
labels on your data.
Question-1 (0.25 pts)
Load the data and plot (visualize) the data points of wines by their Alcohol (feature 1 in x axis) and
Malic acid (feature 2 in y axis).
Question-2 (1 pts)
Pick Magnesium and Color intensity as your two features and for degrees n =1, …, 10 fit a polynomial
of degree n to your data. Plot those fitting lines on the data. You can check the correctness of your
solution with MALAB’s built-in curve fitting function.
Question-3 (1 pts)
For each learned function (n=1, …, 10), compute the empirical square loss (ERM) on data and plot
it as a function of n.
Question-4 (1 pts)
Now, fix the n=10 and add a lasso regularization for your predictor of data. Vary the regularization
parameter in a loop of 20 and visualize the RLM loss. You can check the correctness of your solution
with MALAB’s built-in Lasso.
Question-5 (0.25 pts)
Now, add a third feature of Hue to your data and plot the three in a 3D plot.
Question-6 (1 pts)
For your three selected features, fit a surface to your data of a degree 10.
Question-7 (0.5 pts)
Compare the ERM loss of your surface (question 6) and line (question 3) predictors.
v.2
Question-8 (1 bonus pts)
Fit the data with a Perceptron classifier and compare the loss with respect to your fitted lines
(question-3)