Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 (SVM, 20 points) In this problem, we will apply a support vector machine to classify hand-written digits. You do not have to implement

image text in transcribed

Problem 3 (SVM, 20 points) In this problem, we will apply a support vector machine to classify hand-written digits. You do not have to implement the SVM algorithm: The R library e1071 provides an implementation, see http://cran.r-project.org/web/packages/e1071/index.html Download the digit data set from the course website. The zip archive contains two files: Both files are text files. Each file contains a matrix with one data point (- vector of length 256) per row. The 256-vector in each row represents a 16 16 image of a handwritten number. The data contains two classes-the digits 5 and 6 so they can be labeled as -1 and +1, respectively. The image on the right shows the first row, re-arranged as a 16 16 matrix and plotted as a gray scale image Randomly select about 20% of the data and set it aside as a test set . Train a linear SVM with soft margin. Cross-validate the margin parameter Train an SVM with soft margin and RBF kernel. You will have to cross-validate both the soft-margin parameter and the kernel bandwidth . After you have selected parameter values for both algorithms, train each one with the parameter value you have chosen. Then compute the misclassification rate (the proportion of misclassified data points) on the test set. Homework questions: 1. Plot the cross-validation estimates of the misclassification rate, Please plot the rate as (a) a function of the margin parameter in the linear case (b) a function of the margin parameter and the kernel bandwidth in the non-linear case (you are encouraged to use heat map here 2. Report the test set estimates of the misclassification rates for both cases, with the parameter values you have selected, and compare the two results. Is a linear SVM a good choice for this data, or should we use a non-linear one! Problem 3 (SVM, 20 points) In this problem, we will apply a support vector machine to classify hand-written digits. You do not have to implement the SVM algorithm: The R library e1071 provides an implementation, see http://cran.r-project.org/web/packages/e1071/index.html Download the digit data set from the course website. The zip archive contains two files: Both files are text files. Each file contains a matrix with one data point (- vector of length 256) per row. The 256-vector in each row represents a 16 16 image of a handwritten number. The data contains two classes-the digits 5 and 6 so they can be labeled as -1 and +1, respectively. The image on the right shows the first row, re-arranged as a 16 16 matrix and plotted as a gray scale image Randomly select about 20% of the data and set it aside as a test set . Train a linear SVM with soft margin. Cross-validate the margin parameter Train an SVM with soft margin and RBF kernel. You will have to cross-validate both the soft-margin parameter and the kernel bandwidth . After you have selected parameter values for both algorithms, train each one with the parameter value you have chosen. Then compute the misclassification rate (the proportion of misclassified data points) on the test set. Homework questions: 1. Plot the cross-validation estimates of the misclassification rate, Please plot the rate as (a) a function of the margin parameter in the linear case (b) a function of the margin parameter and the kernel bandwidth in the non-linear case (you are encouraged to use heat map here 2. Report the test set estimates of the misclassification rates for both cases, with the parameter values you have selected, and compare the two results. Is a linear SVM a good choice for this data, or should we use a non-linear one

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

Explain walter's model of dividend policy.

Answered: 1 week ago