当前位置:网站首页>RNN循环神经网络
RNN循环神经网络
2022-07-26 06:11:00 【李峻枫】
时序数据
给出一个较为严格的定义:时间序列数据是同一统一指标按时间顺序记录的数据列。 在同一数据列中的各个数据必须是同口径的,要求具有可比性。 时序数据可以是时期数,也可以时点数。 时间序列分析的目的是通过找出样本内时间序列的统计特性和发展规律性,构建时间序列模型 ,进行样本外预测。
通俗来说,时序数据就是存在着先后关系的数据:
- 具体的时间点(时刻)并不重要;
- 只关注其的先后关系
历史信息
如何记录历史信息是时序数据的一个关键问题。
要记住从开始到现在所有的状态是不可能的。
隐马尔可夫假设
简单来说,就是当前状态只要上一个状态有关,与之前状态无关。即上一个状态可以完美地记录之前的全部信息。
一般而言,这个假设是不成立的,常常会用当前状态前几个或者前几十个状态来表示之前的所有信息。通过这个假设,就可以使得需要记住的状态数大大减少。
引入状态函数
另一种方法来减少需要记录的东西。
假设上一个状态函数是 H t − 1 H_{t-1} Ht−1,当前的输入是 X t X_t Xt。
那么 H t = f ( H t − 1 , X t ) H_t=f(H_{t-1},X_t) Ht=f(Ht−1,Xt)。
不难看出, H t H_t Ht其实就是不断地将 X t X_t Xt进行累积,从某种意义上说,它就是记录了之前的全部信息。
- 这个也正是RNN的基本思想。
RNN神经网络
有两个输入 X t , H t − 1 X_t,H_{t-1} Xt,Ht−1分别表示当前时刻是数据与历史信息。
有两个输出 Y t , H t Y_t,H_t Yt,Ht分别表示当前时刻的输出与包含了当前时刻信息的历史信息。
训练
这里就需要用到隐马尔可夫的思想了。
从时序序列中随机截取一段对模型进行训练。这种做法听起来好像有点奇怪,但是在实际操作中是非常可行了。因为训练的轮次很多,每次训练一段,最终一定会将整个序列都训练一遍。
反观每次从头训练,这样就大大减少了样本数量,非常容易造成过拟合现象。
预测
给点前面几个X,即可,初始状态均设为0。
边栏推荐
- Interview difficulties: difficulties in implementing distributed session, this is enough!
- Kingbasees SQL language reference manual of Jincang database (8. Functions (XI))
- Taobao pinduoduo Tiktok 1688 Suning taote jd.com and other keyword search commodity API interfaces (keyword search commodity API interface, keyword search commodity list interface, classification ID s
- 【Day_01 0418】删除公共字符串
- 知识沉淀一:架构师是做什么?解决了什么问题
- Print linked list in reverse order
- Read five articles in the evening | Economic Daily: don't treat digital collections as wealth making products
- 【Day_03 0420】字符串中找出连续最长的数字串
- 基于消防GIS系统的智慧消防应用
- 【Day_02 0419】排序子序列
猜你喜欢

Amd zen4 game God u reached 208mb cache within this year, which is unprecedented

Convolutional neural network (IV) - special applications: face recognition and neural style transformation

Distributed | practice: smoothly migrate business from MYCAT to dble

What is spark serialization for?

Kingbasees SQL language reference manual of Jincang database (8. Functions (XI))

Unity2d animator cannot create transition

Code Runner for VS Code,下载量突破 4000 万!支持超过50种语言

Mobile web

Balanced binary tree (AVL)~

YOLOv6:又快又准的目标检测框架开源啦
随机推荐
Taobao pinduoduo Tiktok 1688 Suning taote jd.com and other keyword search commodity API interfaces (keyword search commodity API interface, keyword search commodity list interface, classification ID s
【Day02_0419】C语言选择题
Matlab 向量与矩阵
Introduction to three feasible schemes of grammatical generalization
Balanced binary tree (AVL)~
WebAPI整理
Implementation of PHP multitask second timer
VRRP principle and basic commands
递归函数中 有两个递归入口的时间复杂度
Establishment of log collection and analysis platform-1-environment preparation
Viewing the technology stack of distributed system from the crash report of station B
A company installs monitoring for each station: write code only to see employees?
【Day_05 0422】统计回文
YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
知识沉淀一:架构师是做什么?解决了什么问题
【Day_07 0425】合法括号序列判断
【Day_05 0422】连续最大和
Learn about spark project on nebulagraph
数据库sql语言实战
【Day_04 0421】计算糖果