0

我正在尝试在 matlab 中使用 svr。我将所有输入参数都提供给它。当我执行我得到的功能

??? Error using ==> mrdivide
Matrix dimensions must agree.

Error in ==> svkernel at 35
    k = exp(-(u-v)*(u-v)'/(2*p1^2));

Error in ==> svr at 40
      H(i,j) = svkernel(ker,X(i,:),X(j,:));

我检查了错误行。u 和 v 从列向量 X 和 Y 中获取值。

4

1 回答 1

0

I finally sorted it out. SVR toolbox is generated by Steve R. Gunn has a function svKernel that uses p1 and p2 as global variables. But these two values are not declared anywhere in the toolbox, so it's giving an error. Just try to copy those functions into your workspace and add the values to p1 and p2.

于 2013-02-04T04:11:45.043 回答