How to compose RBF kernel in MATLAB ?
9 次查看(过去 30 天)
显示 更早的评论
Hello all, In my research work I need to go for RBF kernel in SVM classification and I do not want to use inbuilt function. So I had composed the RBF function on my own as shown below. My query is that I am not getting how do we include the values of kernel parameter C in this function . Any help in this regard will be highly appreciated.
function G = myrbf(U,V)
gamma = 0.016;
sig = 1/sqrt(gamma);
c = 0.18;
G = exp(-((norm(U-V))^2)/(2*(sig^2)));
end
where U and V receives the training features (dimension 10000 X 2) and training label (10000 X 1) respectively.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!