Question: 9.4 a) Use svm in the e1071 package with the default settings (the default kernel is a radial kernel). What is the expected test error

9.4

9.4 a) Use svm in the e1071 package with the default settings

a) Use svm in the e1071 package with the default settings (the default kernel is a radial kernel). What is the expected test error rate of this method (to within 10%)?

b) Now fit an svm with a linear kernel (kernel = "linear"). What is the expected test error rate to within 10%?

c) What is the expected test error for logistic regression? (to within 10%)

(Don't worry if you get errors saying the logistic regression did not converge.)

In this problem, you will use simulation to evaluate (by Monte Carlo) the expected misclassification error rate given a particular generating model. Let yi be equally divided between classes 0 and 1, and let a E R0 be normally distributed. Given yi = 0, Xi ~ Nio (0, lio). Given yi = 1, Xi ~ Nio (?, lio ) with ? = ( 1 , 1 , 1, 1 , 1 , 0, 0, 0, 0, 0). Now, we would like to know the expected test error rate if we fit an SVM to a sample of 50 random training points from class 1 and 50 more from class 0. We can calculate this to high precision by 1) generating a random training sample to train on, 2) evaluating the number of mistakes we make on a large test set, and then 3) repeating (1-2) many times and averaging the error rate for each trial Aside: in real life don't know the generating distribution, so we have to use resampling methods instead of the procedure described above. For all of the following, please enter your error rate as a number between zero and 1 (e.g., 0.21 instead of 21 if the error rate is 21%)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!