資源簡介
基于matlab的svm預(yù)測 代碼
代碼片段和文件信息
function?[K]?=?kernel(kerxy)
%?Calculate?kernel?function.???
%
%?x:?輸入樣本d×n1的矩陣n1為樣本個(gè)數(shù)d為樣本維數(shù)
%?y:?輸入樣本d×n2的矩陣n2為樣本個(gè)數(shù)d為樣本維數(shù)
%
%?ker??核參數(shù)(結(jié)構(gòu)體變量)
%?the?following?fields:
%???type???-?linear?:??k(xy)?=?x‘*y
%????????????poly???:??k(xy)?=?(x‘*y+c)^d
%????????????gauss??:??k(xy)?=?exp(-0.5*(norm(x-y)/s)^2)
%????????????tanh???:??k(xy)?=?tanh(g*x‘*y+c)
%???degree?-?Degree?d?of?polynomial?kernel?(positive?scalar).
%???offset?-?Offset?c?of?polynomial?and?tanh?kernel?(scalar?negative?for?tanh).
%???width??-?Width?s?of?Gauss?kernel?(positive?scalar).
%???gamma??-?Slope?g?of?the?tanh?kernel?(positive?scalar).
%
%?ker?=?struct(‘type‘‘linear‘);
%?ker?=?struct(‘type‘‘ploy‘‘degree‘d‘offset‘c);
%?ker?=?struct(‘type‘‘gauss‘‘width‘s);
%?ker?=?struct(‘type‘‘tanh‘‘gamma‘g‘offset‘c);
%
%?K:?輸出核參數(shù)n1×n2的矩陣
%-------------------------------------------------------------%
switch?ker.type
????case?‘linear‘
????????K?=?x‘*y;
????case?‘ploy‘
????????d?=?ker.degree;
????????c?=?ker.offs
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????1510??2007-07-04?15:33??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\kernel.m
?????文件???????1987??2010-01-11?21:34??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\Main_SVR.m
?????文件???????3137??2010-01-25?14:43??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\SVM.m
?????文件???????5791??2019-05-14?10:44??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\SVM.rar
?????文件???????2812??2010-01-08?14:51??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\svmSim.m
?????文件???????1764??2010-01-18?15:07??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\svmTrain.m
?????文件???????1847??2009-12-14?20:57??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版\testData.txt
?????目錄??????????0??2019-05-14?10:47??支持向量機(jī)進(jìn)行預(yù)測(SVM)Matlab版
-----------?---------??----------?-----??----
????????????????18848????????????????????8
評(píng)論
共有 條評(píng)論