資源簡介
基于高斯擾動的布谷鳥算法優(yōu)化svr網(wǎng)絡,可搭配libsvm工具包進行回歸預測
代碼片段和文件信息
function?[bestcbestg]?=?gcsSVMcgForRegress(train_labletrain)
%CSSVMCGFORREGRESS?Summary?of?this?function?goes?here
%?參數(shù)初始化??
????n=25;
????pa=0.25;
????cmax=10^2;
????cmin=10^(-1);
????gmax=10^3;
????gmin=10^(-2);
????N_IterTotal=200;
%被發(fā)現(xiàn)是外來蛋的概率pa
%tolerance
Tol=1.0e-1;
%簡單的搜索范圍
%解決方案的維數(shù)
%隨機初始化解決方案/產(chǎn)生鳥窩
for?i=1:n
????nest(i1)=(cmax-cmin)*rand+cmin;
????nest(i2)=(gmax-gmin)*rand+gmin;
end
%找極值和極值點
%得到當前的最優(yōu)值
??%fitness=10^10*ones(n1);
??bestc?=?0;
??bestg?=?0;
??fitness?=?Inf;
??[fminbestnestnestfitness]=get_best_nest(nestnestfitnesstrain_labletrain);
?
%迭代尋優(yōu)
N_iter=0;
for?iter=1:N_IterTotal
????%產(chǎn)生新的解決方法,但是保持當前的最優(yōu)解
????new_nest=get_cuckoos(nestbestnestcmincmaxgmingmax);
????[fnewbestnestfitness]=get_best_nest(nestnew_nestfitnesstrain_labletrain);
????%更新代數(shù)
????N_iter=N_iter+n;
????%被發(fā)現(xiàn)的和移除
????new_nest=empty_nests(nestcmincmaxgmingmaxpa);
????%計算這代的解決方案
???[fnewbestnestfitness]=get_best_nest(nestnew_nest
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????4975??2014-12-28?12:54??1基于高斯擾動的布谷鳥算法優(yōu)化svm網(wǎng)絡?gcsSVMcgForRegress.m
- 上一篇:馬岳林數(shù)字預失真代碼
- 下一篇:SS-US-ELM 最新極限學習機程序
評論
共有 條評論