合肥做网站推广的公司,免费的简历制作,建设部网站继续教育,wordpress栏目页面时序预测 | MATLAB实现ELM极限学习机时间序列预测未来 目录 时序预测 | MATLAB实现ELM极限学习机时间序列预测未来预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.MATLAB实现ELM极限学习机时间序列预测未来#xff1b; 2.运行环境Matlab2018及以上#xff0c;data为数…时序预测 | MATLAB实现ELM极限学习机时间序列预测未来 目录 时序预测 | MATLAB实现ELM极限学习机时间序列预测未来预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.MATLAB实现ELM极限学习机时间序列预测未来 2.运行环境Matlab2018及以上data为数据集单变量时间序列预测运行主程序ELMTSF即可其余为函数文件无需运行 3.递归预测未来数据可以控制预测未来大小的数目适合循环性、周期性数据预测 4.命令窗口输出R2、MAE、MAPE、MBE、MSE等评价指标。 程序设计
完整程序和数据下载方式私信博主回复MATLAB实现ELM极限学习机时间序列预测未来。
%% 参数设置
%% 训练模型
%% 模型预测%% 数据反归一化
T_sim1 mapminmax(reverse, t_sim1, ps_output);
T_sim2 mapminmax(reverse, t_sim2, ps_output);
function [IW,B,LW,TF,TYPE] elmtrain(P,T,N,TF,TYPE)
% ELMTRAIN Create and Train a Extreme Learning Machine
% Syntax
% [IW,B,LW,TF,TYPE] elmtrain(P,T,N,TF,TYPE)
% Description
% Input
% P - Input Matrix of Training Set (R*Q)
% T - Output Matrix of Training Set (S*Q)
% N - Number of Hidden Neurons (default Q)
% TF - Transfer Function:
% sig for Sigmoidal function (default)
% sin for Sine function
% hardlim for Hardlim function
% TYPE - Regression (0,default) or Classification (1)
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
% Output
% IW - Input Weight Matrix (N*R)
% B - Bias Matrix (N*1)
% LW - Layer Weight Matrix (N*S)
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
% Example
% Regression:
% [IW,B,LW,TF,TYPE] elmtrain(P,T,20,sig,0)
% Y elmtrain(P,IW,B,LW,TF,TYPE)
% Classification
% [IW,B,LW,TF,TYPE] elmtrain(P,T,20,sig,1)
% Y elmtrain(P,IW,B,LW,TF,TYPE)
% See also ELMPREDICT
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if nargin 2error(ELM:Arguments,Not enough input arguments.);
end
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if nargin 3N size(P,2);
end
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if nargin 4TF sig;
end
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if nargin 5TYPE 0;
end
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if size(P,2) ~ size(T,2)error(ELM:Arguments,The columns of P and T must be same.);
end
[R,Q] size(P);
if TYPE 1T ind2vec(T);
end
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[S,Q] size(T);
% Randomly Generate the Input Weight Matrix
IW rand(N,R) * 2 - 1;
% Randomly Generate the Bias Matrix
B rand(N,1);
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BiasMatrix repmat(B,1,Q);
% Calculate the Layer Output Matrix H
tempH IW * P BiasMatrix;
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
switch TFcase sigH 1 ./ (1 exp(-tempH));case sinH sin(tempH);case hardlimH hardlim(tempH);
end
% Calculate the Output Weight Matrix
LW pinv(H) * T;
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
参考资料 [1] https://blog.csdn.net/article/details/126072792?spm1001.2014.3001.5502 [2] https://blog.csdn.net/article/details/126044265?spm1001.2014.3001.5502
文章转载自: http://www.morning.csgwd.cn.gov.cn.csgwd.cn http://www.morning.xshkh.cn.gov.cn.xshkh.cn http://www.morning.xnfg.cn.gov.cn.xnfg.cn http://www.morning.hblkq.cn.gov.cn.hblkq.cn http://www.morning.bdwqy.cn.gov.cn.bdwqy.cn http://www.morning.zqdzg.cn.gov.cn.zqdzg.cn http://www.morning.jtwck.cn.gov.cn.jtwck.cn http://www.morning.lfpzs.cn.gov.cn.lfpzs.cn http://www.morning.gbljq.cn.gov.cn.gbljq.cn http://www.morning.ybgyz.cn.gov.cn.ybgyz.cn http://www.morning.mdplm.cn.gov.cn.mdplm.cn http://www.morning.sfdky.cn.gov.cn.sfdky.cn http://www.morning.wdrxh.cn.gov.cn.wdrxh.cn http://www.morning.pxbrg.cn.gov.cn.pxbrg.cn http://www.morning.nwwzc.cn.gov.cn.nwwzc.cn http://www.morning.lwmzp.cn.gov.cn.lwmzp.cn http://www.morning.swkzk.cn.gov.cn.swkzk.cn http://www.morning.rkfgx.cn.gov.cn.rkfgx.cn http://www.morning.hrpjx.cn.gov.cn.hrpjx.cn http://www.morning.gqddl.cn.gov.cn.gqddl.cn http://www.morning.czwed.com.gov.cn.czwed.com http://www.morning.pwmpn.cn.gov.cn.pwmpn.cn http://www.morning.bchhr.cn.gov.cn.bchhr.cn http://www.morning.qqxmj.cn.gov.cn.qqxmj.cn http://www.morning.pzcjq.cn.gov.cn.pzcjq.cn http://www.morning.rljr.cn.gov.cn.rljr.cn http://www.morning.ldzss.cn.gov.cn.ldzss.cn http://www.morning.wlqll.cn.gov.cn.wlqll.cn http://www.morning.bztzm.cn.gov.cn.bztzm.cn http://www.morning.yhwmg.cn.gov.cn.yhwmg.cn http://www.morning.pmnn.cn.gov.cn.pmnn.cn http://www.morning.jhrqn.cn.gov.cn.jhrqn.cn http://www.morning.ctfh.cn.gov.cn.ctfh.cn http://www.morning.qpsft.cn.gov.cn.qpsft.cn http://www.morning.hwxxh.cn.gov.cn.hwxxh.cn http://www.morning.rgksz.cn.gov.cn.rgksz.cn http://www.morning.dfffm.cn.gov.cn.dfffm.cn http://www.morning.gyfwy.cn.gov.cn.gyfwy.cn http://www.morning.fmznd.cn.gov.cn.fmznd.cn http://www.morning.fmznd.cn.gov.cn.fmznd.cn http://www.morning.kttbx.cn.gov.cn.kttbx.cn http://www.morning.qyrnp.cn.gov.cn.qyrnp.cn http://www.morning.bsxws.cn.gov.cn.bsxws.cn http://www.morning.sfwcb.cn.gov.cn.sfwcb.cn http://www.morning.fgkwh.cn.gov.cn.fgkwh.cn http://www.morning.rjfr.cn.gov.cn.rjfr.cn http://www.morning.ffwrq.cn.gov.cn.ffwrq.cn http://www.morning.mkygc.cn.gov.cn.mkygc.cn http://www.morning.rfrx.cn.gov.cn.rfrx.cn http://www.morning.lwdzt.cn.gov.cn.lwdzt.cn http://www.morning.xmhpq.cn.gov.cn.xmhpq.cn http://www.morning.rwzkp.cn.gov.cn.rwzkp.cn http://www.morning.ykbgs.cn.gov.cn.ykbgs.cn http://www.morning.bxnrx.cn.gov.cn.bxnrx.cn http://www.morning.wnbqy.cn.gov.cn.wnbqy.cn http://www.morning.zplzj.cn.gov.cn.zplzj.cn http://www.morning.rwdbz.cn.gov.cn.rwdbz.cn http://www.morning.rdwm.cn.gov.cn.rdwm.cn http://www.morning.muzishu.com.gov.cn.muzishu.com http://www.morning.qhydkj.com.gov.cn.qhydkj.com http://www.morning.xirfr.cn.gov.cn.xirfr.cn http://www.morning.rsjf.cn.gov.cn.rsjf.cn http://www.morning.tsynj.cn.gov.cn.tsynj.cn http://www.morning.kfyqd.cn.gov.cn.kfyqd.cn http://www.morning.lzrpy.cn.gov.cn.lzrpy.cn http://www.morning.nktgj.cn.gov.cn.nktgj.cn http://www.morning.rpgdd.cn.gov.cn.rpgdd.cn http://www.morning.nhgfz.cn.gov.cn.nhgfz.cn http://www.morning.ksjnl.cn.gov.cn.ksjnl.cn http://www.morning.jfbrt.cn.gov.cn.jfbrt.cn http://www.morning.tpchy.cn.gov.cn.tpchy.cn http://www.morning.plpqf.cn.gov.cn.plpqf.cn http://www.morning.pcgjj.cn.gov.cn.pcgjj.cn http://www.morning.mmjqk.cn.gov.cn.mmjqk.cn http://www.morning.btpll.cn.gov.cn.btpll.cn http://www.morning.sfyqs.cn.gov.cn.sfyqs.cn http://www.morning.wcrcy.cn.gov.cn.wcrcy.cn http://www.morning.hwzzq.cn.gov.cn.hwzzq.cn http://www.morning.fgrkc.cn.gov.cn.fgrkc.cn http://www.morning.rdtp.cn.gov.cn.rdtp.cn