91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 763KB
    文件類型: .rar
    金幣: 2
    下載: 1 次
    發布日期: 2021-05-28
  • 語言: Matlab
  • 標簽: 最優化??PSO??

資源簡介

粒子群算法,也稱粒子群優化算法(Particle Swarm Optimization),縮寫為 PSO, 是近年來發展起來的一種新的進化算法。PSO 算法屬于進化算法的一種,和遺傳算法相似,它也是從隨機解出發,通過迭代尋找最優解,它也是通過適應度來評價解的品質,但它比遺傳算法規則更為簡單。壓縮文件內附有英文說明書

資源截圖

代碼片段和文件信息

%?DemoTrainPSO.m
%?little?file?to?test?out?the?pso?optimizer?for?nnet?training
%?trains?to?the?XOR?function
%
%?note:?this?does?*not*?minimize?the?test?set?function
%?rather?it?tries?to?train?a?neural?net?to?approximate?the?
%?test?set?function
%
%?Brian?Birge
%?Rev?1.0
%?1/1/3

clear?all
close?all
clc
help?demotrainpso

% Training?parameters?are:
%????TP(1)?-?Epochs?between?updating?display?default?=?100.
%????TP(2)?-?Maximum?number?of?iterations?(epochs)?to?train?default?=?2000.
%????TP(3)?-?Sum-squared?error?goal?default?=?0.02.
%????TP(4)?-?population?size?default?=?20
%????TP(5)?-?maximum?particle?velocity?default?=?4
%????TP(6)?-?acceleration?constant?1?default?=?2
%????TP(7)?-?acceleration?constant?2?default?=?2
%????TP(8)?-?Initial?inertia?weight?default?=?0.9
%????TP(9)?-?Final?inertia?weight?default?=?0.2
%????TP(10)-?Iteration?(epoch)?by?which?inertial?weight?should?be?at?final?value?default?=?1500
%????TP(11)-?maximum?initial?network?weight?absolute?value?default?=?100
%????TP(12)-?randomization?flag?(flagg)?default?=?2:
%??????????????????????flagg?=?0?same?random?numbers?used?for?each?particle?(different?at?each?epoch?-?least?random)
%??????????????????????flagg?=?1?separate?randomized?numbers?for?each?particle?at?each?epoch
%??????????????????????flagg?=?2?separate?random?#‘s?at?each?component?of?each?particle?at?each?epoch?(most?random)
%????TP(13)-?minimum?global?error?gradient?(if?SSE(i+1)-SSE(i)?%???????????????certain?length?of?epochs?terminate?run?default?=?1e-9
%????TP(14)-?epochs?before?error?gradient?criterion?terminates?run?default?=?200
%???????????????i.e.?if?the?SSE?does?not?change?over?200?epochs?quit?program

nntwarn?off

epdt=25;
maxep=1000;
reqerr=0.02;
maxneur=30;
popsz=20;
maxvel=4;
acnst1=2;
acnst2=2;
inwt1=.9;
inwt2=0.2;
endepoch=1500;
maxwt=0.05;
cnt=0;?%?counter?for?neuron?architecture

%?Training?parameters?change?these?to?experiment?with?PSO?performance
%?type?help?trainpso?to?find?out?what?they?do
TP=[epdtmaxepreqerrpopszmaxvelacnst1acnst2inwt1inwt2endepochmaxwt21e-9200];

disp(‘---------------------------------------------------------------------------------------------------‘);
disp(‘?‘);
disp(‘1.?1?hidden?layer‘);
disp(‘2.?2?hidden?layers‘);
disp(‘3.?no?hidden?layers‘);
arch=input(‘??Pick?a?neural?net?architecture?>‘);
disp(‘?‘);
disp(‘1.?Particle?Swarm?Optimization‘);
disp(‘2.?Standard?Backprop‘);
meth=input(‘??Pick?training?method?>‘);
disp(‘?‘);
disp(‘---------------------------------------------------------------------------------------------------‘);
disp(‘?‘);

%?XOR?function?test?set
?P=[00;01;10;11]‘;
?T=[1;0;0;1]‘;
?minmax=[01;01];
?l1=0;
?l2=1;?
tr(1)=99;?%?arbitrary?choice?of?initial?error?just?used?to?update?#?of?neurons

if?arch==3
???[w1b1]=initff(minmax1‘tansig‘);
???if?meth==1
??????[w1b1tetr]=trainpso(w1b1‘tansig‘PTTP);??????
???elseif?m

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????741121??2003-05-22?13:25??PSO工具箱\PSOt\A?Particle?Swarm?Optimization?(PSO)?Primer.pdf

?????文件???????3952??2009-01-01?17:37??PSO工具箱\PSOt\DemoTrainPSO.asv

?????文件???????3951??2003-01-10?12:23??PSO工具箱\PSOt\DemoTrainPSO.m

?????文件????????286??2001-07-27?09:49??PSO工具箱\PSOt\f6.m

?????文件????????203??2009-10-22?11:50??PSO工具箱\PSOt\f6.txt

?????文件????????941??2003-01-08?22:36??PSO工具箱\PSOt\goplotpso.m

?????文件????????148??2003-01-09?22:16??PSO工具箱\PSOt\hypara.m

?????文件????????227??2003-01-09?22:22??PSO工具箱\PSOt\hypara2.m

?????文件???????4455??2001-08-08?10:15??PSO工具箱\PSOt\normalize.m

?????文件??????41810??2003-03-11?14:20??PSO工具箱\PSOt\Particle?Swarm?Optimization?Matlab?Toolbox?1_conformat_.pdf

?????文件??????10600??2003-01-10?12:42??PSO工具箱\PSOt\pso.m

?????文件???????2399??2009-01-01?17:56??PSO工具箱\PSOt\PSOBP.txt

?????文件????????450??2003-01-10?14:59??PSO工具箱\PSOt\ReadME.txt

?????文件???????9118??2003-01-10?11:59??PSO工具箱\PSOt\tpso1.m

?????文件???????8856??2003-01-10?11:57??PSO工具箱\PSOt\tpso2.m

?????文件???????8923??2003-01-10?11:56??PSO工具箱\PSOt\tpso3.m

?????文件???????2940??2003-01-10?13:39??PSO工具箱\PSOt\trainpso.m

?????文件????????988??2001-07-20?10:12??PSO工具箱\PSOt\unwrapmat.m

?????文件????????874??2001-07-25?09:47??PSO工具箱\PSOt\wrapmat.m

?????目錄??????????0??2008-11-17?17:17??PSO工具箱\PSOt

?????目錄??????????0??2008-11-17?17:17??PSO工具箱

-----------?---------??----------?-----??----

???????????????842242????????????????????21


評論

共有 條評論