预测自适应滤波

机器学习 (Machine Learning)

什么是自适应过滤? (What is Adaptive filtering?)

Adaptive filtering is a computational device that attempts to model the relationship between two signals, whose coefficients change with an objective to make the filter converge to an optimal state. The optimization criterion is a cost function, which is most commonly the mean square of the error between the output of the adaptive filter and the desired signal. The mean square error (MSE) will converge to its minimal value, while the filter adapts its coefficients. The figure below demonstrates the simple adaptive filter.

自适应滤波是一种计算设备,它试图对两个信号之间的关系进行建模,其信号随目标而变化,以使滤波器收敛到最佳状态。 最优化准则是代价函数,最常见的是自适应滤波器输出与所需信号之间误差的均方。 均方误差(MSE)将收敛到其最小值,而滤波器会调整其系数。 下图演示了简单的自适应滤波器。

The adaptive filter will try to match the filter output, y(k), with the desired signal, d(k). The adaptive filter will also learn using the error, e(k), and adjust the coefficient. Hence, it is adapted to the new environment, input x(k).

自适应滤波器将尝试使滤波器输出y(k)与所需信号d(k)匹配。 自适应滤波器还将学习使用误差e(k)并调整系数。 因此,它适应于新环境,输入x(k)

This brings us to the main feature of adaptive filtering, which is it has the real-time capability to adjust the response with the intent to improve its performance (sounds like self-learning, anyone?). The adaptation algorithm is implemented through two methods; gradient method and least square (LMS, RLS algorithm).

这将我们带到了自适应滤波的主要特征,即它具有实时功能,可以调整响应以提高其性能 (听起来像自学之类的声音,有人吗?)。 自适应算法是通过两种方法实现的: 梯度法和最小二乘(LMS,RLS算法)。

这是为了什么 (What is it for?)

If you have studied any digital signal and processing courses, you will see most of the adaptive filter application on identifying an unknown communications channel, canceling noise or interference, or predicting the future values of a periodic signal.

如果您已学习过任何数字信号和处理课程,则将在识别未知通信信道,消除噪声或干扰或预测周期信号的未来值时看到大多数自适应滤波器应用程序。

那么我们如何在业务环境中使用它呢? (So how we can use it in a business setting?)

Based on the last example of the digital use case, we can apply the concept to predict future values in real-time settings, for example; stock price prediction. However, predicting the future using this approach requires several key assumptions; the data is either steady or slowly varying over time, and periodic overtime as well.

例如,基于数字用例的最后一个示例,我们可以将其应用到实时设置中预测未来值。 股票价格预测。 但是,使用这种方法预测未来需要几个关键假设。 数据随时间变化是稳定的或缓慢变化的,以及周期性的超时变化

Accepting these assumptions, the adaptive filter must predict the future values of the desired output based on past input values. Hence, we need to structure the delay in the input signal and feed them to the adaptive filter system.

接受这些假设,自适应滤波器必须基于过去的输入值来预测所需输出的未来值。 因此,我们需要构造输入信号中的延迟,并将其馈入自适应滤波器系统。

Predicting future values using an adaptive filter
使用自适应滤波器预测未来价值

As stated earlier, the adaptive filter is used to identify and understand the unknown system, we can use this to identify and predict the time series behavior.

如前所述,自适应滤波器用于识别和了解未知系统,我们可以使用它来识别和预测时间序列行为。

Python实现 (Python implementation)

There is a library named padasip in Python, where you can use it to implement adaptive filtering. Check out the library at the following link.

Python中有一个名为padasip的库,您可以在其中使用它来实现自适应过滤。 在以下链接中检查库。

简单的实现示例 (Simple implementation example)

Let’s take a look at a simple example before using the adaptive filters on time series data. Assume we have the following equation:

让我们看一个简单的示例,然后再对时间序列数据使用自适应滤波器。 假设我们有以下等式:

We can then prepare the input, target, and run through the filter (using LMS, in this example). For additional sources of filter algorithm, please visit here.

然后,我们可以准备输入,目标并通过过滤器运行(在此示例中,使用LMS)。 有关过滤器算法的其他来源,请访问此处 。

After we run f.run(d, x) , we will get the prediction (y), error (e), and the weight of each iteration (w). We can see that the first several iterations, the filter cannot accurately predict the target but as the higher iterations, the filter starts to adapt and predict closely to target values.

运行f.run(d, x) ,我们将获得预测(y),误差(e)和每次迭代的权重(w)。 我们可以看到,在前几次迭代中,过滤器无法准确预测目标,但是随着迭代次数的增加,过滤器开始适应并预测目标值。

The comparison between actual and predicted value (upper figure), the error for each iteration (lower figure)
实际值和预测值之间的比较(上图),每次迭代的误差(下图)

使用NLMS对股价数据进行实施 (Implementation using NLMS on stock price data)

Now let’s try to predict the Uniqlo’s closing stock price (from 2012–2016).

现在,让我们尝试预测优衣库的收盘价(从2012年至2016年)。

Given time series data (Uniqlo’s closing price)
给定时间序列数据(优衣库的收盘价)

We will start by building the filter using the first 1000 data points with 5 lagged data points for each prediction iteration. Three values of mu have been tested, sample code with best mu (minimum error) has been shown below.

我们将使用每个预测迭代的前1000个数据点和5个滞后数据点构建滤波器。 已测试了三个mu值,下面显示了具有最佳mu(最小误差)的示例代码。

Partial code
部分代码
Visualization of NLMS filter result along with first and last 300 iterations
可视化的NLMS过滤器结果以及前300次和后300次迭代

We can see how the filter required several (around 60) iterations to adjust the weights to fit the data. During this phase, we are also getting the filter for further usage. Snippet code below shows how we can use them in a production environment.

我们可以看到过滤器如何需要几次(大约60次)迭代来调整权重以适合数据。 在此阶段,我们还将获取过滤器以供进一步使用。 下面的代码段显示了我们如何在生产环境中使用它们。

From the code, we get the best filter from the previous step and use it to predict the new data points (line 18). After the prediction is made, we then use the adapt the method of the filter to adjust the weights (line 20). The output and error have been visualized below.

从代码中,我们可以从上一步中获得最佳过滤器,并使用它来预测新的数据点(第18行)。 做出预测后,我们将使用过滤器的适应方法来调整权重(第20行)。 输出和错误已在下面显示。

Adaptive filter results on simulated real-time data
对模拟实时数据的自适应滤波器结果

尾注 (Endnote)

In this example, I demonstrate how we can use the adaptive filter on time series data to predict the future value. There is a lot of filter and algorithm to try for the adaptive filter. Proper filter type may need to view and select for the given problem you have. Hopefully, this introduces you to the adaptive filter and its basic implementation onto the real-world scenario.

在此示例中,我演示了如何在时间序列数据上使用自适应滤波器来预测未来价值。 自适应滤波器有很多滤波器和算法可以尝试。 适当的过滤器类型可能需要查看并选择给定的问题。 希望这将向您介绍自适应滤波器及其在实际场景中的基本实现。

You can view the full notebook and the sample dataset on my Github (or click here to view the notebook directly) and feel free to connect with me on LinkedIn.

您可以在我的Github上查看完整的笔记本和示例数据集(或单击此处直接查看笔记本),并随时在LinkedIn上与我联系。

翻译自: https://medium.com/towards-artificial-intelligence/time-series-prediction-using-adaptive-filtering-491a43d8fa93

预测自适应滤波


http://www.taodudu.cc/news/show-1873917.html

相关文章:

  • 蜜源假货_假货
  • 机器学习 预测模型_基于机器学习模型的汽车价格预测(第2部分)
  • artsy 爬虫_让我们得到Artsy! 使用神经网络创建自定义Snapchat过滤器!
  • 大数据 机器学习 人工智能_在这个季节中,您如何免费学习数据科学,人工智能和机器学习。...
  • 机器学习时会发生什么
  • Noodle.ai的Atlas机器学习(ML)框架第1部分:构建AI应用程序面临的挑战
  • mavan自动化接管浏览器_人工智能与自动化:接管还是共生?
  • canva画板_客户体验,人工智能和机器学习-Oovvuu,Canva和Minerva集体的想法
  • 马斯克神经网络转换器_通过转换数据来减少人工神经网络的复杂性
  • 无需编码生成信息系统_无需编码即可逐步进行花分类
  • 动态时间规整算法_如何使用动态时间规整算法进行语音识别
  • 逻辑运算 神经网络_使用神经网络实现逻辑门(第2部分)
  • ai 实用新型专利_专利制度协调AI创造的创新
  • 缓冲区是人为设定的吗_人为的,但这真的是情报吗?
  • 对Librehash海洋协议审查的回应
  • 使用lstm实现文本生成_Spamilton:使用LSTM和Hamilton歌词生成文本
  • nlp n-gram_NLP中的单词嵌入:一键编码和Skip-Gram神经网络
  • nas神经网络架构搜索_神经建筑搜索(NAS)基础
  • web与ai相结合成为趋势_将AI和行为科学相结合可以改变体验
  • 递归神经网络/_递归神经网络
  • Kardashev量表和AI:可能的床友
  • 变异数分析_人工智能系统中分析变异的祸害
  • ai时代大学生的机遇和挑战_评估AI对美术的影响:威胁或机遇
  • 人工智能+智能运维解决方案_人工智能驱动的解决方案可以提升您的项目管理水平
  • c语言 机器语言 汇编语言_多语言机器人新闻记者
  • BrainOS —最像大脑的AI
  • 赵本山 政治敏锐_每天5分钟保持敏锐的7种方法
  • 面试问到处理过什么棘手问题_为什么调节人工智能如此棘手?
  • python svm向量_支持向量机(SVM)及其Python实现
  • 游戏世界观构建_我们如何构建技术落后的世界

预测自适应滤波_使用自适应滤波的时间序列预测相关推荐

  1. Transformers预测未来:关注下一帧和时间序列预测

    Transformers预测未来:关注下一帧和时间序列预测 关注人工智能学术前沿 回复 :ts35 5秒免费获取论文pdf文档,及项目源码 摘要 直到最近,递归神经网络还是捕获时序相关性的最佳方法之一 ...

  2. alpha beta 滤波_不同Alpha-Beta滤波算法的精度分析及改进

    不同Alpha-Beta滤波算法的精度分析及改进 刘常娟1, 王运锋2, 杨 玲3 [摘 要]摘 要: 机动目标跟踪是雷达应用系统的一个重要组成部分,在机动目标跟踪中,目标的跟踪 精度作为一项能够反映 ...

  3. 图像 理想低通滤波_图像处理之滤波(下)

    [toc]目录 一.常规滤波 低通 高通 带通 带阻 二.非局部均值滤波 三.维纳滤波 四.卡尔曼滤波 前言 所谓滤波,其实就是从混合在一起的诸多信号中提取出所需要的信号. 信号的分类: 确定型信号, ...

  4. 心电电路算法滤波_心电仪滤波

    被处理信号的来源 被处理信号的特性分析 (1) 信号的特征时域特征:时频特性分析可以出电信号具有的特点 (2) 频谱特征 信号的干扰分析从而得出需要进行何种预处理. 滤波处理方法有两种: (1) 硬件 ...

  5. python点云滤波_点云滤波去噪

    关于点云滤波去噪的方法 为什么进行点云滤波处理: (1) 点云数据密度不规则需要平滑 (2) 因为遮挡等问题造成离群点需要去除 (3) 大量数据需要下采样 (4) 噪声数据需要去除 1234 点云数据 ...

  6. python 时间序列预测_使用Python进行动手时间序列预测

    python 时间序列预测 Time series analysis is the endeavor of extracting meaningful summary and statistical ...

  7. python 相关性检验怎么计算p值_不会Python进行时间序列预测?不要紧,大神来教你...

    作者:Leandro Rabelo译者:李洁整理:Lemonbit本文内容较长,较为详细的阐述了进行时间序列预测的步骤,有些内容可能暂时用不到或者看不懂,但不要紧,知道有这么一个概念,后续碰到的时候, ...

  8. python预测机票价格_一种国内机票价格预测方法与流程

    本发明属于机票查询预测技术领域,具体涉及一种国内机票价格预测方法. 背景技术: 随着生活水平的提高,选择飞机作为旅游出行的交通工具的人数逐年增加.但是,旅客对于机票价格依然十分敏感,且以最优价格购买心 ...

  9. java中值滤波_中值滤波 java实现

    中值滤波器原理 如果不在边缘区域,图像的数据是平缓的,没有太大的差值.因此,一个噪声点的值要么过大,要么过小.比如下图,左图是没有处理的原图,250在该区域由为突出,通过对3*3的9个数据进行排序,将 ...

  10. python 计量做hp滤波_关于HP滤波法 怎么取得趋势成分和波动成分

    MATLAB中有hpfilter函数(或者在MATLAB的帮助文档内搜索Hodrick) Syntax hpfilter(S) hpfilter(S,smoothing) T = hpfilter(. ...

最新文章

  1. systemstap 脚本 内核开发必备技能 基础讲解 (一)
  2. python计算直角三角形顶点坐标
  3. python 中有趣的库tqdm
  4. 如何提高Google Adsense单价:点击率篇
  5. 我的工作日志 2020年12月1日 星期一
  6. Python模块之hashlib:提供hash算法
  7. python upload_python文件上传
  8. docker daemon 配置文件
  9. linux查看hid设备,linux hid设备读写
  10. 软件也要歧视大龄程序员吗?
  11. html给table加外边框,如何给table添加边框
  12. 2022-01-28总结 CSS复合选择器
  13. 全文检索技术 mysql_浅谈MYSQL的全文检索的应用
  14. Genius ACM(倍增+归并排序)
  15. 信息论实验-信源编码算法 (Huffman and Shannonn Fano编码C++实现)
  16. 面试简历上的项目经验
  17. Android个人简历自我评价,Android开发工程师岗位个人简历自我评价范文
  18. 韩国与日本历年GDP总量和人均GDP的对比(1953-2020年)
  19. 微信高级群发接口 {errcode:40008,errmsg:invalid message type hint: [aRIDBA0726age9]}
  20. mysql导入.idb文件进行修复数据库

热门文章

  1. 【python游戏编程之旅】第八篇---pygame游戏开发常用数据结构
  2. Windows系统Ionic安装教程/Ionic环境配置
  3. win32SDK的hello,world程序(二)
  4. 玩转 Python 3.5 的 await/async
  5. 图形数据库 Neo4j(2) ----Java
  6. 2021-02-13
  7. Python 多线程-共享全局变量问题 -args参数 同步的概念
  8. 20190901每日一句 那就从现在开始吧,让生命变得更有价值
  9. 190327每日一句
  10. Atitit 命令行dsl传递参数的几种模式对比 cli url模式 键值对NameValuePair urlutil String string = -host 101.13