Question: create a new svm . SVC ( ) object and assign it to the variable clf 1 a call to svm . SVC ( )
create a new svmSVC object and assign it to the variable clf a call to svmSVC creates a Support Vector Classifier from the svm submodule, similar to what we did in the earlier exercise on handwritten digits
call the fit method on clf with the x and y training data ie training the model to associate xtrain with ytrain
call the predict method on clf on the x testing data and assign the result to the variable predictions in order to make predictions for those inputs
call the accuracyscore function on the y testing data and the test predictions you generated and assign the result to the variable score
print the value of score
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
