资源简介
SAX符号化序列范例源码
--------------------
timeseries2symbol.m:
--------------------
This function takes in a time series and convert it to string(s).
There are two options:
1. Convert the entire time series to ONE string
2. Use sliding windows, extract the subsequences and convert these subsequences to strings
For the first option, simply enter the length of the time series as "N"
ex. We have a time series of length 32 and we want to convert it to a 8-symbol string,
with alphabet size 3:
timeseries2symbol(data, 32, 8, 3)
For the second option, enter the desired sliding window length as "N"
ex. We have a time series of length 32 and we want to extract subsequences of length 16 using
sliding windows, and convert the subsequences to 8-symbol strings, with alphabet size 3:
timeseries2symbol(data, 16, 8, 3)
Input:
data is the raw time series.
N is the length of sliding window (use the length of the raw time series
instead if you don't want to have sliding windows)
n is the number of symbols in the low dimensional approximation of the sub sequence.
alphabet_size is the number of discrete symbols. 2 <= alphabet_size <= 10, although alphabet_size = 2 is a
special "useless" case.
Output:
symbolic_data: matrix of symbolic data (no-repetition). If consecutive subsequences
have the same string, then only the first occurrence is recorded, with
a pointer to its location stored in "pointers"
pointers: location of the first occurrences of the strings
N/n must be an integer, otherwise the program will give a warning, and abort.
The variable "win_size" is assigned to N/n, this is the number of data points on the raw
time series that will be mapped to a single symbol, and can be imagined as the
"compression rate".
The symbolic data is returned in "symbolic_data", with pointers to th

代码片段和文件信息
% 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)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2344 2006-04-21 12:23 SAX_2006_ver\mindist_demo.m
文件 4382 2006-04-21 12:23 SAX_2006_ver\min_dist.m
文件 8454 2003-11-26 12:28 SAX_2006_ver\README.txt
文件 33280 2006-04-22 14:19 SAX_2006_ver\SAX.doc
文件 5249 2006-04-21 13:32 SAX_2006_ver\sax_demo.m
文件 17408 2006-04-21 11:57 SAX_2006_ver\sax_to_20.xls
文件 6082 2006-04-21 12:24 SAX_2006_ver\symbolic_visual.m
文件 8033 2006-04-21 12:17 SAX_2006_ver\timeseries2symbol.m
目录 0 2006-04-22 14:20 SAX_2006_ver\
- 上一篇:周立功 液晶转LVDS信号板
- 下一篇:CNN VivadoHLS
相关资源
- 温度传感器DS18B20序列号批量搜索算法
- 遍历USB设备,获取USB序列号
- SourceInsight 3.5安装包和序列号,win10可
- 根据硬件ID和程序ID生成注册码
- 编程实现二维DCT变换
- 图像二值化
- 用FFT对信号进行频谱分析
- DISKID硬盘序列号查看器
- 混沌时间序列分析工具箱
- Tone-Reservation
- QGA 量子遗传算法
- 格雷码是一个长度为2^n的序列,序列
- Diskhook(模拟硬盘序列号)
- 差分形式的阻滞增长模型
- 遗传算法的M文件
- 基于经济时间序列预测的露天矿开采
- IL-13基因microRNA靶序列单核苷酸多态性
- 简单二阶互联系统的非线性动力学分
- CuteFTP8.0绿色破解版免安装无需序列号
- 视频处理软件NeroVideo2019v20.0.3001中文特
- 易语言雪悦U盘锁屏源码
- 易语言枚举U盘序列号源码
- 易语言取U盘序列号源码
- 易语言RFC1982序列号算法源码
- 易语言取U盘序列号模块源码
- Delphi Windows7环境获取硬盘序列号(支
- 微卫星DNA序列完整性对多态性的影响
- 利用足丝蛋白序列鉴定贻贝属(Myti
- delphi 取硬件序列号(souce)
- 获取电脑硬件的详细信息,与注册有
评论
共有 条评论