用svm做回归预测,为什么预测值都是一样的?

2024-05-09 21:25

1. 用svm做回归预测,为什么预测值都是一样的?

你看看支持向量机的书或者faruto的教程,预测值一样的话肯定是你选择的参数有问题,model = svmtrain(train_y,train_x,'-s 3 -t 2 -c 15000 -g 128 -p 0.001' );

用svm做回归预测,为什么预测值都是一样的?

2. 用svm做回归预测,为什么预测值都是一样的

第一,要先看你建立的回归方程中各个自变量是否都具有显著预测作用;第二,你的回归方程预测效果如何,也就是决定系数R方有多大,如果预测效果很差,用方程计算出来的值和原始值肯定出入很大。除非R方等于1,否则不可能用方程预测出来的值都和原始值完全一样。

3. 请教Matlab中SVM回归预测问题

en . -s 3是回归模型:

-s svm_type : set type of SVM (default 0)
        0 -- C-SVC
        1 -- nu-SVC
        2 -- one-class SVM
        3 -- epsilon-SVR
        4 -- nu-SVR

==============
libsvm_options:
-s svm_type : set type of SVM (default 0)
        0 -- C-SVC
        1 -- nu-SVC
        2 -- one-class SVM
        3 -- epsilon-SVR
        4 -- nu-SVR
-t kernel_type : set type of kernel function (default 2)
        0 -- linear: u'*v
        1 -- polynomial: (gamma*u'*v + coef0)^degree
        2 -- radial basis function: exp(-gamma*|u-v|^2)
        3 -- sigmoid: tanh(gamma*u'*v + coef0)
        4 -- precomputed kernel (kernel values in training_instance_matrix)
-d degree : set degree in kernel function (default 3)
-g gamma : set gamma in kernel function (default 1/k)
-r coef0 : set coef0 in kernel function (default 0)
-c cost : set the parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1)
-n nu : set the parameter nu of nu-SVC, one-class SVM, and nu-SVR (default 0.5)
-p epsilon : set the epsilon in loss function of epsilon-SVR (default 0.1)
-m cachesize : set cache memory size in MB (default 100)
-e epsilon : set tolerance of termination criterion (default 0.001)
-h shrinking: whether to use the shrinking heuristics, 0 or 1 (default 1)
-b probability_estimates: whether to train a SVC or SVR model for probability estimates, 0 or 1 (default 0)
-wi weight: set the parameter C of class i to weight*C, for C-SVC (default 1)
-v n: n-fold cross validation mode

请教Matlab中SVM回归预测问题

4. matlab中SVM回归问题

首先需要MATLAB SVM Toolbox,将其中的文件解压并命名为svm。
将文件拷到E:\matlab\toolbox。
打开matlab点击set path---->add folder ,然后把工具箱文件夹添加进去就可以了。
路径加进去后在file→Preferences→General的Toolbox Path Caching里点击update Toolbox Path Cache更新一下。
最后在matlab的命令栏中输入which svcoutput可以查看路径E:\matlab\toolbox\svm\svcoutput.m就可以了。


5. 自己写的一个Matlab的SVM回归程序,请求帮助

riverdata=[8.07 48.8 0.27 0.0191 3.0;2.70 200.0 1.55 0.074 1500.0;2.35 70 0.43 0.10 110;
3.84 72 0.76 0.13 260;0.85 47.0 0.32 0.067 14.0;2.10 60.0 0.94 0.104 54.0;
2.1 53 0.83 0.107 47;0.4 19 0.16 0.116 9.9;0.85 34 0.15 0.055 9.5;
0.76 64.0 0.67 0.27 35;1.56 24 0.71 0.043 9.6;1.1 59 0.88 0.12 42;
2.16 69 1.55 0.17 160;0.94 26 0.34 0.067 33;0.91 37 0.4 0.067 39;
2.04 104 0.58 0.05 315;4.75 127 0.64 0.08 670;0.49 16.0 0.27 0.08 20;
0.85 18 0.6 0.1 21;0.58 25 1.01 0.14 14;2.47 34 0.82 0.18 65;
0.43 16 0.37 0.05 14;0.58 36 0.21 0.049 8.1];
riverdata_train=riverdata(1:16,1:4);
riverdata_trainlabels=riverdata(1:16,5);
riverdata_test=riverdata(17:23,1:4);
riverdata_testlabels=riverdata(17:23,5);
%优选参数
bestmse=1;
for log2c = -10:10,
for log2g=-10:10,
cmd=['-v 4 -c',num2str(2^log2c),'-g',num2str(2^log2g),'-s 3 -p 0.4 -n 0.1'];
cv=svmtrain(riverdata_trainlabels,riverdata_train,cmd);
if (cv<bestmse),
bestmse=cv;bestc=2^log2c;bestg=2^log2g;
end
end
end

自己写的一个Matlab的SVM回归程序,请求帮助

6. 求LS-SVM回归预测的MATLAB程序

能否考虑在这上面下载个:http://www.esat.kuleuven.be/sista/lssvmlab/

7. 如何使用libsvm进行回归预测

Libsvm、Python和Gnuplot。我用的版本分别是:Libsvm(2.8.1),Python(2.4),Gnuplot(3.7.3)。注意:Gnuplot一定要用3.7.3版,3.7.1版的有bug. 修改训练和测试数据的格式(可以自己用perl编个小程序): 目标值 第一维特征编号:第一

如何使用libsvm进行回归预测

8. 支持向量机SVM做回归预测的时候,模型已经训练好了,预测没有标签值的数据,该怎么做呢(Matlab)

请问您现在知道了吗?谢谢