当前位置:网站首页>时间序列曲线相似性
时间序列曲线相似性
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

峰谷想错的时候,距离最大
边栏推荐
- 深入浅出零钱兑换问题——背包问题的套壳
- "Learning Cloud Networking with Teacher Tang" - Problem Location - The host is working but the container is not working
- 零代码开发入门:快速上手DIY函数公式的5个步骤
- 正则表达式快速入门笔记
- 神经网络学习笔记4——自动编码器(含稀疏,堆叠)(更新中)
- spin lock和mutex使用场景的差异
- vscode中写markdown格式笔记的配置过程和相关语法
- ODrive应用 #4 配置参数&指令「建议收藏」
- 电压跟随器不要随便加
- HJY-F931A/YJ three-phase voltage relay
猜你喜欢

AB测试 总结归纳

Still using Swagger?I recommend this interface management artifact with zero code intrusion

久经沙场的程序员居然也被某鱼的假程序员骗了,程序员之间的信任应该是最高的,他一个人毁了这种信任感

The package of idea is not hollow

高能产出!腾讯内部的MyCat中间件手册,理论实操齐下

Beyond Stream Processing!The 4th real-time computing Flink challenge is launched, and 490,000 prizes are waiting for you!

Performance testing of API Gateway APISIX on Google Cloud T2A and T2D

360发布面向未来的EDR,全方位守护政企用户终端安全

从数据流中快速查找中位数

我又造了个轮子:GrpcGateway
随机推荐
STM32F1读取MLX90632非接触式红外温度传感器
Unity 锁定相机第二弹
【ASP.NET Core】选项类的依赖注入
AB测试 总结归纳
易基因:人类tRNA基因位点表现出与衰老相关的DNA高甲基化|研究文章
XYplorer 23多语言,最好的管理软件之一
原生js 创建表格
TestNg整合Retry代码
TensorFlow custom training function
"Learning Cloud Networking with Teacher Tang" - Problem Location - The host is working but the container is not working
EA中的业务对象和业务实体你分得清吗?
高能产出!腾讯内部的MyCat中间件手册,理论实操齐下
log4j Logger简介说明
pg_rewind 修复主备环境的时间线
feign远程调用时如何在请求头加入数据
安全提示:Qt中的FreeType
SQL language and paging rownum analysis in Oracle
【云筑共创】华为云携手鸿蒙,端云协同,培养创新型开发者
拖放事件,dataTransfer,getBoundingClientRect
High energy output!Tencent's internal MyCat middleware manual, both theoretical and practical