1 Programming Exercise 4: Multi-class Classification and Neural Networks Machine Learning Introduction In this exercise, you will implement one-vs-all logistic regression and neural networks to recognize hand-written digits. To get started with the exercise, you will need to download the starter code and unzip its contents to the directory where you wish to complete the exercise. If needed, use the cd command in Octave/MATLAB to change to this directory before starting this exercise. You can log into your CougarNet and download MATLAB from this website: . Files included in this exercise ex4.m- Octave/MATLAB script that steps you through part 1 ex4nn.m- Octave/MATLAB script that steps you through part 2 ex4data1.mat- Training set of hand-written digits ex4weights.mat- Initial weights for the neural network exercise submit.m- Submission script that sends your solutions to our servers displayData.m- Function to help visualize the dataset fmincg.m - Function minimization routine (similar to fminunc) sigmoid.m- Sigmoid function lrCostFunction.m- Logistic regression cost function [y] oneVsAll.m- Train a one-vs-all multi-class classifier [y] predictOneVsAll.m- Predict using a one-vs-all multi-class classifier [y] predict.m- Neural network prediction function yindicates files you will need to completeFiles needed to be submit ML_ex4– Include all the code (You need to complete oneVsAll.m, predictOneVsAll.mand predict.mby yourself) ex4_report – Directlygive the answers of three questions: (1) Minimum cost found by fmincg function for all digits (1, 2, 3 ...
Subscribe to view the full document.
2 9, 0): (2) Training set accuracy using one-vs-all logistic regression method (3) Training set accuracy with neural networks Throughout the exercise, you will be using the scripts ex4.mandex4nn.m.This script set up the dataset for the problems and make calls to functions that you will write. You do not need to modify these scripts. You are only required to modify other functions, by following the instructions in this assignment. Where to get help The exercises in this course use Octave1or MATLAB, a high-level programming language well-suited for numerical computations. At the Octave/MATLAB command line, typing help followed by a function name displays documentation for a built-in function. For example, help plot will bring up help information for plotting. Further documentation for Octave func-tions can be found at the Octave documentation pages. MAT- LAB document-tation can be found at the MATLAB documentation pages. Do not look at any source code written by others or share your source code with others. 1Multi-class Classification For this exercise, you will use logistic regression and neural networks to recognize handwritten digits (from 0 to 9). Automated handwritten digit recognition is widely used today - from recognizing zip codes (postal codes) on mail envelopes to recognizing amounts written on bank checks. This exercise will show you how the methods you’ve learned can be used for this classification task.
As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.
Temple University Fox School of Business ‘17, Course Hero Intern
I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.
University of Pennsylvania ‘17, Course Hero Intern
The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.