Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider an SVM classifier using RBF kernel, and finish the following python code to search for the optimum kernel parameter . You are required to
Consider an SVM classifier using RBF kernel, and finish the following python code to search for the optimum kernel parameter You are required to calculate the
RBF function and search yourself, instead of using functions in ScikitLearn sklearn
def parametersearchgammalist,XtrytrXtsyts :
Parameters
gammalist: A list of RBF kernel parameter gamma to search for
Xtr: Training data, shape ntrnrow,ncol
ytr: Training labels, shape ntr
Xts: Test data, shape nts nrow,ncol
yts: Test labels, shape nts
Add other parameters as needed
Returns :
gammaoptimum: The gamma with minimum error on Xts yts
return gammaoptimum
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started