Apply logistic regression to the data set vehicle.mat2. The task is to classify a given silhouette as one of two types of vehicles, i.e. SAAB and BUS, using a set of features extracted from the silhouette. You are required to use MATLAB for this assignment.
Use the MATLAB command mapstd to normalize the values of each feature so that the mean is 0 and the variance is 1.
Perform gradient descent on the cross-entropy error function. Initialize the weights to small non-zero values (use the MATLAB command randn). Adjust the learning rate used for the weight update step
and to minimize the number of epochs needed to reach close to optimal performance. Report the resulting learning rate , the performance after 10000 epochs. Hand in a plot showing the dependence of the error on the number of epochs for .
Perform linear regression using the Moore-Penrose pseudo-inverse of the design matrix . Compare the resulting cross-entropy error to the one obtained in b).
Apply the iterative reweighted least squares algorithm to the dataset. Report the performance after 100 epochs and the number of epochs needed to reach close to optimal performance. Hand in a plot showing the dependence of the error on the number of epochs. Compare the results to the one obtained in b).