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

峰谷想错的时候,距离最大
边栏推荐
- 湖仓一体电商项目(一):项目背景和架构介绍
- MySQL——数据库基础
- Neural Ordinary Differential Equations
- 久经沙场的程序员居然也被某鱼的假程序员骗了,程序员之间的信任应该是最高的,他一个人毁了这种信任感
- feign远程调用时如何在请求头加入数据
- Easy gene: human tRNA gene loci showed age-related high DNA methylation | research articles
- Typroa 替代工具marktext
- ESP32CAM 1838接收红外遥控器信号
- 安全提示:Qt中的FreeType
- 单片机开发之LCD1602显示实验
猜你喜欢

【云原生】-Docker安装部署分布式数据库 OceanBase

向上管理读书笔记

Microsoft SQL服务器被黑客入侵 带宽被窃取
![[Qualcomm][Network] 网络拨号失败和netmgrd服务分析](/img/76/49054ff8c7215eca98cc479ab1d986.png)
[Qualcomm][Network] 网络拨号失败和netmgrd服务分析

The package of idea is not hollow

Leetcode 125. 验证回文串

Verilog之数码管译码

【ASP.NET Core】选项类的依赖注入

Typroa 替代工具marktext

Beyond Stream Processing!The 4th real-time computing Flink challenge is launched, and 490,000 prizes are waiting for you!
随机推荐
mysql与redis 区别
TensorFlow custom training function
RY-D1/1电压继电器
HJY-F931A/YJ three-phase voltage relay
数据库性能系列之索引(上)
GBJ2510-ASEMI电机专用25A整流桥GBJ2510
log4j Logger简介说明
The configuration process and related syntax of writing markdown format notes in vscode
NLP领域的最新研究进展
idea的package没有空心
零代码开发入门:快速上手DIY函数公式的5个步骤
Leetcode 125. 验证回文串
jmeter接口压力测试(一)
@RequestBody 和 @ResponseBody 详解
正则表达式快速入门笔记
unity3d C#语言基础(继承)
Detailed explanation of @RequestBody and @ResponseBody
Neural Network Study Notes 3 - LSTM Long Short-Term Memory Network
async.js入门
MySQL——数据库基础