ex4_instructions.pdf - Programming Exercise 4 Multi-class...

This preview shows page 1 - 3 out of 10 pages.

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 y indicates files you will need to complete Files needed to be submit [1] ML_ex4 Include all the code (You need to complete oneVsAll.m, predictOneVsAll.m and predict.m by yourself) [2] ex4_report Directly give the answers of three questions: (1) Minimum cost found by fmincg function for all digits ( 1, 2, 3 ...
Image of page 1

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.m and ex4nn.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 Octave 1 or 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. 1 Multi-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.
Image of page 2
Image of page 3

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern