资源简介
经典的时间序列符号化算法SAX,该算法通过将一条时间序列等区间划分,利用每个区间的均值代表该区间序列,进而采用相应的符号进行描述,该算法可以实现时间序列的符号化表示,达到降维的目的,并能够通过MATLAB进行可视化描述
代码片段和文件信息
% Copyright and terms of use (DO NOT REMOVE):
% The code is made freely available for non-commercial uses only provided that the copyright
% header in each file not be removed and suitable citation(s) (see below) be made for papers
% published based on the code.
%
% The code is not optimized for speed and we are not responsible for any errors that might
% occur in the code.
%
% The copyright of the code is retained by the authors. By downloading/using this code you
% agree to all the terms stated above.
%
% [1] Lin J. Keogh E. Lonardi S. & Chiu B.
% “A Symbolic Representation of Time Series with Implications for Streaming Algorithms.“
% In proceedings of the 8th ACM SIGMOD Workshop on Research Issues in Data Mining and
% Knowledge Discovery. San Diego CA. June 13 2003.
%
%
% [2] Lin J. Keogh E. Patel P. & Lonardi S.
% “Finding Motifs in Time Series“. In proceedings of the 2nd Workshop on Temporal Data Mining
% at the 8th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.
% Edmonton Alberta Canada. July 23-26 2002
%
% This function demonstrates that mindist lower-bounds the true euclidean distance
%
% Copyright (c) 2003 Eamonn Keogh Jessica Lin Stefano Lonardi Pranav Patel Li Wei. All rights reserved.
%
function mindist_demo
temp = sin(0:0.32:20)‘; % make a long sine wave
time_series_A = temp([1:32]); % make one test time series from the sine wave
time_series_B = temp([12:43]); % make another test time series from the sine wave
time_series_A = (time_series_A - mean(time_series_A)) / std(time_series_A);
time_series_B = (time_series_B - mean(time_series_B)) / std(time_series_B);
alphabet_size = 4; % Choose an alphabet size
plot( [time_series_A time_series_B]) % View the test time series
% Now let us create a SAX representation of the time series
sax_version_of_A = timeseries2symbol(time_series_A328 alphabet_size)
sax_version_of_B = timeseries2symbol(time_series_B328 alphabet_size)
% compute the euclidean distance between the time series
euclidean_distance_A_and_B = sqrt(sum((time_series_A - time_series_B).^2))
% compute the lower bounding distance between the time series
min_dist(sax_version_of_A sax_version_of_B alphabet_size4)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4382 2006-04-21 12:23 SAX\min_dist.m
文件 2344 2006-04-21 12:23 SAX\mindist_demo.m
文件 8454 2003-11-26 12:28 SAX\README.txt
文件 33280 2006-04-22 14:19 SAX\SAX.doc
文件 5432 2015-09-25 09:11 SAX\sax_demo.m
文件 17408 2006-04-21 11:57 SAX\sax_to_20.xls
文件 6082 2006-04-21 12:24 SAX\symbolic_visual.m
文件 8033 2006-04-21 12:17 SAX\timeseries2symbol.m
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论