当前位置: 首页 > news >正文

免费简历制作网站推荐房产网站设计公司

免费简历制作网站推荐,房产网站设计公司,什么网站做兼职最好,网页制作费用预算多输入多输出 | MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出 目录 多输入多输出 | MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出预测效果基本介绍程序设计往期精彩参考资料 预测效果 基本介绍 多输入多输出 | MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出…多输入多输出 | MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出 目录 多输入多输出 | MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出预测效果基本介绍程序设计往期精彩参考资料 预测效果 基本介绍 多输入多输出 | MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出 1.data为数据集10个输入特征3个输出变量。 2.main.m为主程序文件。 3.命令窗口输出MBE、MAE和R2可在下载区获取数据和程序内容。 程序设计 完整程序和数据下载方式私信博主回复MATLAB实现GA-BP遗传算法优化BP神经网络多输入多输出。 %----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function [x, endPop, bPop, traceInfo] ga(bounds, evalFN, evalOps, startPop, opts, ... termFN, termOps, selectFN, selectOps, xOverFNs, xOverOps, mutFNs, mutOps)% Output Arguments: % x - the best solution found during the course of the run % endPop - the final population % bPop - a trace of the best population % traceInfo - a matrix of best and means of the ga for each generation % % Input Arguments: % bounds - a matrix of upper and lower bounds on the variables % evalFN - the name of the evaluation .m function % evalOps - options to pass to the evaluation function ([NULL]) % startPop - a matrix of solutions that can be initialized % from initialize.m % opts - [epsilon prob_ops display] change required to consider two % solutions different, prob_ops 0 if you want to apply the % genetic operators probabilisticly to each solution, 1 if % you are supplying a deterministic number of operator % applications and display is 1 to output progress 0 for % quiet. ([1e-6 1 0]) % termFN - name of the .m termination function ([maxGenTerm]) % termOps - options string to be passed to the termination function % ([100]). % selectFN - name of the .m selection function ([normGeomSelect]) % selectOpts - options string to be passed to select after % select(pop,#,opts) ([0.08]) % xOverFNS - a string containing blank seperated names of Xover.m % files ([arithXover heuristicXover simpleXover]) % xOverOps - A matrix of options to pass to Xover.m files with the % first column being the number of that xOver to perform % similiarly for mutation ([2 0;2 3;2 0]) % mutFNs - a string containing blank seperated names of mutation.m % files ([boundaryMutation multiNonUnifMutation ... % nonUnifMutation unifMutation]) % mutOps - A matrix of options to pass to Xover.m files with the % first column being the number of that xOver to perform % similiarly for mutation ([4 0 0;6 100 3;4 100 3;4 0 0])%% 初始化参数 n nargin; if n 2 || n 6 || n 10 || n 12disp(Insufficient arguements) end% 默认评估选项 if n 3 evalOps []; end% 默认参数 if n 5opts [1e-6, 1, 0]; end% 默认参数 if isempty(opts)opts [1e-6, 1, 0]; end%% 判断是否为m文件 if any(evalFN 48)% 浮点数编码 if opts(2) 1e1str [xc1; c1(xZomeLength), evalFN ;]; e2str [xc2; c2(xZomeLength), evalFN ;]; % 二进制编码elsee1str [xb2f(endPop(j,:),bounds,bits); endPop(j,xZomeLength), evalFN ;];end else% 浮点数编码if opts(2) 1e1str [[c1 c1(xZomeLength)] evalFN (c1,[gen evalOps]);]; e2str [[c2 c2(xZomeLength)] evalFN (c2,[gen evalOps]);];% 二进制编码elsee1str[xb2f(endPop(j,:),bounds,bits);[x v] evalFN ...(x,[gen evalOps]); endPop(j,:)[f2b(x,bounds,bits) v];]; end end%% 默认终止信息 if n 6termOps 100;termFN maxGenTerm; end%% 默认变异信息 if n 12% 浮点数编码if opts(2) 1mutFNs boundaryMutation multiNonUnifMutation nonUnifMutation unifMutation;mutOps [4, 0, 0; 6, termOps(1), 3; 4, termOps(1), 3;4, 0, 0];% 二进制编码elsemutFNs binaryMutation;mutOps 0.05;end end%% 默认交叉信息 if n 10% 浮点数编码if opts(2) 1xOverFNs arithXover heuristicXover simpleXover;xOverOps [2, 0; 2, 3; 2, 0];% 二进制编码elsexOverFNs simpleXover;xOverOps 0.6;end end%% 仅默认选择选项即轮盘赌。 if n 9selectOps []; end%% 默认选择信息 if n 8selectFN normGeomSelect;selectOps 0.08; end%% 默认终止信息 if n 6termOps 100;termFN maxGenTerm; end%% 没有定的初始种群 if n 4startPop []; end%% 随机生成种群 if isempty(startPop)startPop initializega(80, bounds, evalFN, evalOps, opts(1: 2)); end%% 二进制编码 if opts(2) 0bits calcbits(bounds, opts(1)); end%% 参数设置 xOverFNs parse(xOverFNs); mutFNs parse(mutFNs); xZomeLength size(startPop, 2); % xzome 的长度 numVar xZomeLength - 1; % 变量数 popSize size(startPop,1); % 种群人口个数 endPop zeros(popSize, xZomeLength); % 第二种群矩阵 numXOvers size(xOverFNs, 1); % Number of Crossover operators numMuts size(mutFNs, 1); % Number of Mutation operators epsilon opts(1); % Threshold for two fittness to differ oval max(startPop(:, xZomeLength)); % Best value in start pop bFoundIn 1; % Number of times best has changed done 0; % Done with simulated evolution gen 1; % Current Generation Number collectTrace (nargout 3); % Should we collect info every gen floatGA opts(2) 1; % Probabilistic application of ops display opts(3); % Display progress %% 精英模型 while(~done)[bval, bindx] max(startPop(:, xZomeLength)); % Best of current popbest startPop(bindx, :);if collectTracetraceInfo(gen, 1) gen; % current generationtraceInfo(gen, 2) startPop(bindx, xZomeLength); % Best fittnesstraceInfo(gen, 3) mean(startPop(:, xZomeLength)); % Avg fittnesstraceInfo(gen, 4) std(startPop(:, xZomeLength)); end%% 最佳解if ( (abs(bval - oval) epsilon) || (gen1))% 更新显示if displayfprintf(1, \n%d %f\n, gen, bval); end% 更新种群矩阵if floatGAbPop(bFoundIn, :) [gen, startPop(bindx, :)]; elsebPop(bFoundIn, :) [gen, b2f(startPop(bindx, 1 : numVar), bounds, bits)...startPop(bindx, xZomeLength)];endbFoundIn bFoundIn 1; % Update number of changesoval bval; % Update the best valelseif displayfprintf(1,%d ,gen); % Otherwise just update num genendend %% 选择种群endPop feval(selectFN, startPop, [gen, selectOps]);% 以参数为操作数的模型运行if floatGAfor i 1 : numXOversfor j 1 : xOverOps(i, 1)a round(rand * (popSize - 1) 1); % Pick a parentb round(rand * (popSize - 1) 1); % Pick another parentxN deblank(xOverFNs(i, :)); % Get the name of crossover function[c1, c2] feval(xN, endPop(a, :), endPop(b, :), bounds, [gen, xOverOps(i, :)]);% Make sure we created a new if c1(1 : numVar) endPop(a, (1 : numVar)) c1(xZomeLength) endPop(a, xZomeLength);elseif c1(1:numVar) endPop(b, (1 : numVar))c1(xZomeLength) endPop(b, xZomeLength);elseeval(e1str);endif c2(1 : numVar) endPop(a, (1 : numVar))c2(xZomeLength) endPop(a, xZomeLength);elseif c2(1 : numVar) endPop(b, (1 : numVar))c2(xZomeLength) endPop(b, xZomeLength);elseeval(e2str);endendPop(a, :) c1;endPop(b, :) c2;endendfor i 1 : numMutsfor j 1 : mutOps(i, 1)a round(rand * (popSize - 1) 1);c1 feval(deblank(mutFNs(i, :)), endPop(a, :), bounds, [gen, mutOps(i, :)]);if c1(1 : numVar) endPop(a, (1 : numVar)) c1(xZomeLength) endPop(a, xZomeLength);elseeval(e1str);endendPop(a, :) c1;endend%% 运行遗传算子的概率模型else for i 1 : numXOversxN deblank(xOverFNs(i, :));cp find((rand(popSize, 1) xOverOps(i, 1)) 1);if rem(size(cp, 1), 2) cp cp(1 : (size(cp, 1) - 1)); endcp reshape(cp, size(cp, 1) / 2, 2);for j 1 : size(cp, 1)a cp(j, 1); b cp(j, 2); [endPop(a, :), endPop(b, :)] feval(xN, endPop(a, :), endPop(b, :), ...bounds, [gen, xOverOps(i, :)]);endendfor i 1 : numMutsmN deblank(mutFNs(i, :));for j 1 : popSizeendPop(j, :) feval(mN, endPop(j, :), bounds, [gen, mutOps(i, :)]);eval(e1str);endendend% 更新记录gen gen 1;done feval(termFN, [gen, termOps], bPop, endPop); % See if the ga is donestartPop endPop; % Swap the populations[~, bindx] min(startPop(:, xZomeLength)); % Keep the best solutionstartPop(bindx, :) best; % replace it with the worstend [bval, bindx] max(startPop(:, xZomeLength));%% 显示结果 if display fprintf(1, \n%d %f\n, gen, bval); end%% 二进制编码 x startPop(bindx, :); if opts(2) 0x b2f(x, bounds,bits);bPop(bFoundIn, :) [gen, b2f(startPop(bindx, 1 : numVar), bounds, bits)...startPop(bindx, xZomeLength)]; elsebPop(bFoundIn, :) [gen, startPop(bindx, :)]; end%% 赋值 if collectTracetraceInfo(gen, 1) gen; % 当前迭代次数traceInfo(gen, 2) startPop(bindx, xZomeLength); % 最佳适应度traceInfo(gen, 3) mean(startPop(:, xZomeLength)); % 平均适应度 end 往期精彩 MATLAB实现RBF径向基神经网络多输入多输出预测 MATLAB实现BP神经网络多输入多输出预测 MATLAB实现DNN神经网络多输入多输出预测 参考资料 [1] https://blog.csdn.net/kjm13182345320/article/details/116377961 [2] https://blog.csdn.net/kjm13182345320/article/details/127931217 [3] https://blog.csdn.net/kjm13182345320/article/details/127894261
http://www.dnsts.com.cn/news/231855.html

相关文章:

  • 微商手机网站制作公司石家庄有什么好玩的地方
  • 可以免费做网站吗国内有奖活动第一分享平台
  • 百度网盘网站开发文档模板品牌设计与策划
  • 物流网站建设网wordpress内外网访问
  • p2p网站制作流程青岛市建设工程质量安全监督站官方网站
  • 可信赖的宜昌网站建设网站建设咨询推荐
  • wordpress站点标题删除企业导航网站源码
  • ftp如何上传网站毕业设计做网站还是系统
  • 哪家网站建设公司深圳航空公司官网
  • 跨境网站有哪些平台制作旅游景点介绍网页
  • 国外数码印花图案设计网站平台公司实体化转型
  • 代做企业网站什么亲子网站可以做一下广告词
  • 国外响应式网站模板模版网站商城
  • 临沂网站建设 百度优化网页设计与制作实训总结3000字
  • 延安市城乡建设局网站wordpress安装成功后怎么进后台
  • 网站的优化与推广分析wordpress禁止更新代码
  • 国外可以做自媒体的网站互联网装修公司加盟
  • 杭州上城区建设局网站视差效果网站
  • 网站 视觉上仙桃网站优化
  • 传奇网站模板psdqt网站开发
  • 中铁建设投资集团有限公司招聘网站微信开放平台官方网站
  • 查销售数据的网站wordpress 语法高亮
  • 网站404怎么解决2024中核招聘网最新招聘公告
  • 开发网站比较好的公司源码之家进不去
  • 网站内容维护费用公司购买网站建设费用会计分录
  • 自己做视频网站上传视频网站(网店)建设方案范文
  • 建网站需要哪些资质胶州网站搭建企业
  • l网站建设网站建设二级关键词什么意思
  • 简单三栏网站网页美工设计简单流程
  • 国外设计网站大全迷失传奇网站naocq