Error Using rbf kernel and poly kernel LS-SVM Toolbox

13 次查看(过去 30 天)
Hey, I'm having a problem here, I'm trying to train my data with rbf_kernel and poly_kernel of LS-SVM Toolbox Links Is Here link LS-SVMLAB 1.8 it stated that the function is
[alpha, b] = trainlssvm({X,Y,type,gam,sig2,'rbf_kernel',preprocess})
but it gives me an error when I use poly_kernel:
Attempted to access kernel_pars(2); index out of bounds because numel(kernel_pars)=1.
Error in kernel_matrix (line 80) omega = (Xtrain*Xtrain'+kernel_pars(1)).^kernel_pars(2);
Error in lssvmMATLAB (line 28) omega = kernel_matrix(model.xtrain(model.selector, 1:model.x_dim), ...
Error in trainlssvm (line 225) model = lssvmMATLAB(model);
When I use rbf_kernel :
Error in kernel_matrix (line 32) [nb_data,d] = size(Xtrain);
Output argument "omega" (and maybe others) not assigned during call to "C:\Program Files\MATLAB\R2012a\toolbox\lssvm\kernel_matrix.m>kernel_matrix".
Error in lssvmMATLAB (line 28) omega = kernel_matrix(model.xtrain(model.selector, 1:model.x_dim), ...
Error in trainlssvm (line 225) model = lssvmMATLAB(model);
before that, i stated gam = 10 and sig2 = 0.2
Is there anything that i have missed?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by