基于Kaggle训练集预测的多层人工神经网络的能源消耗的时间序列预测(Matlab代码实现)

  👨‍🎓个人主页:研学社的博客 

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🌈3 Matlab代码实现

🎉4 参考文献


💥1 概述

本文为能源消耗的时间序列预测,在Matlab中实现。该预测采用多层人工神经网络,基于Kaggle训练集预测未来能源消耗。

📚2 运行结果

 

 

部分代码:

%% Exercise 2 - Recurrent Neural Networks

%% Initial stuff
clc
clearvars
close all

%% 1 - Hopfield Network

% Note: for this exercise, it will be interesting to check what happens if
% you add more neurons, i.e. modify T such as N is bigger.

T = [1 1; -1 -1; 1 -1]';                                                    % N x Q matrix containing Q vectors with components equal to +- 1.
                                                                            % 2-neuron network with 3 atactors
net = newhop(T);                                                            % Create a recurrent HOpfield network with stable points being the vectors from T

A1 = [0.3 0.6; -0.1 0.8; -1 0.5]';                                          % Example inputs
A2 = [-1 0.5 ; -0.5 0.1 ; -1 -1 ]';
A3 = [1 0.5  ; -0.3 -0.4 ; 0.8 -0.6]';
A4 = [0 -0.1 ; 0.1 0 ; -0.5 0.1]';
A5 = [0 0 ; 0 0.1  ; -0.1 0 ]';
A0 = [1 1; -1 -1; 1 -1]';
% Simulate a Hopfield network
% Y_1 = net([],[],Ai);                                                      % Single step iteration    

num_step = 20;                                                              % Number of steps                
Y_1 = net({num_step},{},A1);                                                % Multiple step iteration
Y_2 = net({num_step},{},A2);  
Y_3 = net({num_step},{},A3);  
Y_4 = net({num_step},{},A4);  
Y_5 = net({num_step},{},A5);

%% Now we try with 4 Neurons

T_ = [1 1 1 1; -1 -1 1 -1; 1 -1 1 1]';                                      % N x Q matrix containing Q vectors with components equal to +- 1.
                                                                            % 4-neuron network with 3 atactors
net_ = newhop(T_);                                                          % Create a recurrent HOpfield network with stable points being the vectors from T

A1_ = [0.3 0.6 0.3 0.6; -0.1 0.8 -0.1 0.8; -1 0.5 -1 0.5]';                 % Example inputs
A2_ = [-1 0.2 -1 0.2 ; -0.5 0.1  -0.5 0.1 ; -1 -1 -1 -1 ]';
A3_ = [1 0.5 1 0.5 ; -0.3 -0.4 -0.3 -0.4 ; 0.8 -0.6 0.8 -0.6]';
A4_ = [-0.5 -0.3 -0.5 -0.3 ; 0.1 0.8 0.1 0.8 ; -0.7 0.6 -0.7 0.6]';
% Simulate a Hopfield network
% Y_1 = net([],[],Ai);                                                      % Single step iteration    

num_step_ = 40;                                                             % Number of steps                
Y_1_ = net_({num_step_},{},A1_);                                            % Multiple step iteration
Y_2_ = net_({num_step_},{},A2_);  
Y_3_ = net_({num_step_},{},A3_);  
Y_4_ = net_({num_step_},{},A4_); 

%% Execute rep2.m || A script which generates n random initial points and visualises results of simulation of a 2d Hopfield network 'net'

% Note: The idea is to understand what is the relation between symmetry and
% attractors. It does not make sense that appears a fourth attractor when
% only 3 are in the Target T
close all 

🌈3 Matlab代码实现

🎉4 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]程静,郑定成,吴继权.基于时间序列ARMA模型的广东省能源需求预测[J].能源工程,2010(01):1-5.DOI:10.16189/j.cnki.nygc.2010.01.012.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值