Question: Please use R code, thanks you! The objective of the questions to follow is to perform a multi-class classification by utilizing one-vs-one classification technique. a.

Please use R code, thanks you!

Please use R code, thanks you! The objective of the questions to

The objective of the questions to follow is to perform a multi-class classification by utilizing one-vs-one classification technique. a. Consider the following simulated training data in the data frame dat consisting of 4 features 21, 12, 13, 14 and one response vector y. set.seed (123); p=4;n=120 x=matrix(rnorm(n*p),n,p) y=c(rep("A",n/3), rep("B",n/3), rep ("C",n/3)) x[y=="A"]=x (y=="A")-1; x[y=="C"]=x[y=="C"]+1 dat=data.frame (x=x, y=y) b. The response vector y of the data frame dat contains 3-labels, A, B, C. Obtain three subsets of the training data: (i) dat.sub1: containing all rows in dat that correspond to the class labels y = A or y= B. (ii) dat sub2: containing all rows in dat that correspond to the class labels y= A or y=C. (iii) dat.sub3: containing all rows in dat that correspond to the class labels y = B or y=C. c. Fit a separate linear support vector machine model to each of the three data sub sets in part (b). Talking: Kevin Black

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!