100% Guaranteed Results


CSE 417T: Homework 3 Solved
$ 24.99
Category:

Description

5/5 – (1 vote)

Notes:
• Please check the submission instructions for Gradescope and SVN provided on the coursewebsite. You must follow those instructions exactly.
• You have to submit your written solutions (including reports for programming problems) toGradescope. SVN is used to submit code only. Write-ups submitted via SVN will not be accepted or graded.
• We have checked in two stub Matlab files that you need to complete and submit for Problem1.
• There are 4 problems on 2 pages in this homework.
• Keep in mind that problems and exercises are distinct in LFD.
Problems:
1. (50 points) Check out the files logisticreg.m and findtesterror.m from the SVN repository set up for this assignment. Also download the files clevelandtrain.csv and clevelandtest.csv from the “Resources” tab in Piazza. Note that these two files are not in the SVN repos and please do not add them there.
The source files are just function headers that need to be filled in. findtesterror should encode a function that, given as inputs a weight vector w, a data matrix X and a vector of true labels y (in the formats defined in the header), returns the classification error of w on the data (assuming that the classifier applies a threshold at 0 to the dot product of w and a feature vector x (augmented with a 1 in the first position in the vector to allow for a constant or bias term). logisticreg should encode a gradient descent algorithm for learning a logistic regression model. It should return a weight vector w and the training set error Ein (not the classification error, the negative log likelihood function) as defined in class. Use a learning rate ⌘ = 10 5 and automatically terminate the algorithm if the magnitude of each term in the gradient is below 10 3 at any step.
1
• Implement the functions in the two files. Remember to check in the final version ofyour code for these two files.
• Read more about the “Cleveland” dataset we’ll be using here:ics.uci.edu/ml/datasets/Heart+Disease https://archive.
• Learn a logistic regression model on the data inabout the fact that the classes are 0/1 – you should convert them toclevelandtrain.csv1/ +1(be carefulso that everything we’ve done in class is still valid). Apply the model to classify the data (using a probability of 0.5 as the threshold) in clevelandtest.csv. In your writeup, report Ein as well as the classification error on both the training and test data when using three different bounds on the maximum number of iterations: ten thousand, one hundred thousand, and one million. What can you say about the generalization properties of the model?
• Now train and test a logistic regression model using the inbuilt matlab function(learn about and use the “binomial” option, and check the label format). Compare theglmfit results with the best ones you achieved and also compare the time taken to achieve the results.
2. (15 points) LFD Exercise 4.5
3. (15 points) LFD Problem 4.8
4. (20 points) LFD Problem 4.25, parts (a) through (c) only
2

Reviews

There are no reviews yet.

Be the first to review “CSE 417T: Homework 3 Solved”

Your email address will not be published. Required fields are marked *

Related products