資源簡介
謝菲爾德(Sheffield)遺傳算法工具箱,神經網絡的專用工具箱

代碼片段和文件信息
%?BS2RV.m?-?Binary?string?to?real?vector
%
%?This?function?decodes?binary?chromosomes?into?vectors?of?reals.?The
%?chromosomes?are?seen?as?the?concatenation?of?binary?strings?of?given
%?length?and?decoded?into?real?numbers?in?a?specified?interval?using
%?either?standard?binary?or?Gray?decoding.
%
%?Syntax:???????Phen?=?bs2rv(ChromFieldD)
%
%?Input?parameters:
%
%???????????????Chrom????-?Matrix?containing?the?chromosomes?of?the?current
%??????????????????????????population.?Each?line?corresponds?to?one
%??????????????????????????individual‘s?concatenated?binary?string
%??????????? ???representation.?Leftmost?bits?are?MSb?and
% ???????????????rightmost?are?LSb.
%
%???????????????FieldD???-?Matrix?describing?the?length?and?how?to?decode
%??????????? ???each?substring?in?the?chromosome.?It?has?the
%??????????? ???following?structure:
%
% [len; (num)
% ?lb; (num)
% ?ub; (num)
% ?code; (0=binary?????|?1=gray)
% ?scale; (0=arithmetic?|?1=logarithmic)
% ?lbin; (0=excluded???|?1=included)
% ?ubin]; (0=excluded???|?1=included)
%
% ???where
% len???-?row?vector?containing?the?length?of
%??? each?substring?in?Chrom.?sum(len)
% ???? should?equal?the?individual?length.
% lb
% ub????-?Lower?and?upper?bounds?for?each
% ???? variable.?
% code??-?binary?row?vector?indicating?how?each
% ???? substring?is?to?be?decoded.
% scale?-?binary?row?vector?indicating?where?to
% ???? use?arithmetic?and/or?logarithmic
% ???? scaling.
% lbin
% ubin??-?binary?row?vectors?indicating?whether
% ???? or?not?to?include?each?bound?in?the
% ???? representation?range
%
%?Output?parameter:
%
%???????????????Phen?????-?Real?matrix?containing?the?population?phenotypes.
%
%?Author:?Carlos?Fonseca? Updated:?Andrew?Chipperfield???
%?Date:?08/06/93 ????Date:?26-Jan-94
%
%?Tested?under?MATLAB?v6?by?Alex?Shenfield?(17-Jan-03)
function?Phen?=?bs2rv(ChromFieldD)
%?Identify?the?population?size?(Nind)
%??????and?the?chromosome?length?(Lind)
[NindLind]?=?size(Chrom);
%?Identify?the?number?of?decision?variables?(Nvar)
[sevenNvar]?=?size(FieldD);
if?seven?~=?7
error(‘FieldD?must?have?7?rows.‘);
end
%?Get?substring?properties
len?=?FieldD(1:);
lb?=?FieldD(2:);
ub?=?FieldD(3:);
code?=?~(~FieldD(4:));
scale?=?~(~FieldD(5:));
lin?=?~(~FieldD(6:));
uin?=?~(~FieldD(7:));
%?Check?substring?properties?for?consistency
if?sum(len)?~=?Lind
error(‘Data?in?FieldD?must?agree?with?chromosome?length‘);
end
if?~all(lb(scale).*ub(scale)>0)
error(‘Log-scaled?variables?must?not?include?0?in?their?range‘);
end
%?Decode?chromosomes
Phen?=?zeros(NindNvar);
lf?=?cumsum(len);
li?=?cumsum([1?len]);
Prec?=?.5?.^?len;
logsgn?=?sign(lb(scale));
lb(scale)?=?log(?abs(lb(scale))?);
ub(scale)?=?log(?abs(ub(scale))?);
delta?=?ub?-?lb;
Prec?=?.5?.^?len;
num?=?(~lin)?.*?Prec;
den?=?(lin?+?uin?-?1)?.*?Prec;
for?i?=?1:Nv
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1166??2003-01-26?16:45??rws.m
?????文件???????1255??2003-01-26?16:46??scaling.m
?????文件???????2466??2003-01-26?16:46??select.m
?????文件???????2161??2003-01-24?15:18??sga.m
?????文件???????1384??2003-01-22?12:13??sus.m
?????文件???????1106??2003-01-22?12:32??xovdp.m
?????文件???????1155??2003-01-22?12:37??xovdprs.m
?????文件???????2873??2003-01-22?12:42??xovmp.m
?????文件???????1097??2003-01-22?12:43??xovsh.m
?????文件???????1145??2003-01-22?12:44??xovshrs.m
?????文件???????1110??2003-01-22?12:45??xovsp.m
?????文件???????1155??2003-01-22?12:47??xovsprs.m
?????文件??????53484??1998-04-22?11:14??DOC\GATBXA0.PS
?????文件?????204230??1998-04-22?11:14??DOC\GATBXA1.PS
?????文件?????200234??1998-04-22?11:14??DOC\GATBXA2.PS
?????文件???????5111??2003-01-26?16:47??Test_fns\demoga1.m
?????文件???????4783??2003-01-26?16:49??Test_fns\mpga.m
?????文件???????2611??2003-01-29?17:17??Test_fns\objbran.m
?????文件???????4206??2003-01-26?19:14??Test_fns\objdopi.m
?????文件???????2507??2003-01-29?17:25??Test_fns\objeaso.m
?????文件???????2714??2003-01-21?11:23??Test_fns\objfun1.m
?????文件???????2582??2003-01-21?11:24??Test_fns\objfun1a.m
?????文件???????2441??2003-01-21?11:24??Test_fns\objfun1b.m
?????文件???????2593??2003-01-21?11:25??Test_fns\objfun2.m
?????文件???????2819??2003-01-21?11:25??Test_fns\objfun6.m
?????文件???????2523??2003-01-21?11:25??Test_fns\objfun7.m
?????文件???????2747??2003-01-21?11:25??Test_fns\objfun8.m
?????文件???????2470??2003-01-21?11:26??Test_fns\objfun9.m
?????文件???????2700??2003-01-21?11:49??Test_fns\objgold.m
?????文件???????2643??2003-01-21?11:49??Test_fns\objharv.m
............此處省略39個文件信息
- 上一篇:基本風+陣風+噪聲風+漸變風聯合仿真
- 下一篇:DSP283xx的AD7606的程序
評論
共有 條評論