当前位置:网站首页>时间序列曲线相似性
时间序列曲线相似性
2022-07-30 11:03:00 【jaffe—fly】
使用DTW比较曲线相似性
from dtaidistance import dtw as dtwd
import numpy as np
import matplotlib.pyplot as plt
from labellines import labelLines
x=np.arange(0,2*np.pi,0.1)
y=np.sin(x)
plt.plot(x, y,label='y')
for i in [0,1,2,3]:
z=np.sin(x+(np.pi/2)*i)
distance_s = dtwd.distance(y, z,use_c=True)
plt.plot(x,z,label=str(i))
print(distance_s)
#简单的设置legend(设置位置)
#位置在右上角
plt.legend(loc = 'upper right')
0.0
3.579437105036351
5.914434728535967
3.3300802329969446
峰谷想错的时候,距离最大
边栏推荐
- Beyond Stream Processing!The 4th real-time computing Flink challenge is launched, and 490,000 prizes are waiting for you!
- Scrapy crawler website image crawling
- "Learning Cloud Networking with Teacher Tang" - Problem Location - The host is working but the container is not working
- 电压跟随器不要随便加
- PanGu-Coder: 函数级的代码生成模型
- log4j中appender的简介说明
- 三个点语法和DOM观察者
- 神经网络学习笔记3——LSTM长短期记忆网络
- Beyond Stream Processing !第四届实时计算 Flink 挑战赛启动,49 万奖金等你来拿!
- pg_rewind 修复主备环境的时间线
猜你喜欢
随机推荐
真正懂经营管理的CIO具备哪些特质
stm32 RTC闹钟唤醒低功耗模式
FPGA刷题——计数器(简易秒表、可置位计数器、加减计数器)
mysql与redis 区别
还在用Swagger?我推荐这款零代码侵入的接口管理神器
Telerik2022 R2,有效的自动化测试
Beyond Stream Processing !第四届实时计算 Flink 挑战赛启动,49 万奖金等你来拿!
久经沙场的程序员居然也被某鱼的假程序员骗了,程序员之间的信任应该是最高的,他一个人毁了这种信任感
ABP学习资源整理
优酷VIP会员周卡只需7.5元,看《沉香如屑》用优酷视频
RandLA-Net复现记录
向上管理读书笔记
feign远程调用时如何在请求头加入数据
Drools 规则引擎一文读懂
XYplorer 23多语言,最好的管理软件之一
How to add data to the request header when feign is called remotely
Taobao/Tmall taobao comments q&a list interface API
The configuration process and related syntax of writing markdown format notes in vscode
鸿湖万联扬帆富设备开发板正式合入OpenHarmony主干
Drag and drop events, dataTransfer, getBoundingClientRect