Matrix Profile III The Matrix Profile allows Visualization

  • Slides: 32
Download presentation
Matrix Profile III: The Matrix Profile allows Visualization of Salient Subsequences in Massive Time

Matrix Profile III: The Matrix Profile allows Visualization of Salient Subsequences in Massive Time Series Chin-Chia Michael Yeh, Helga Van Herle, Eamonn Keogh http: //www. cs. ucr. edu/~eamonn/Matrix. Profile. html

Outline • • 2 Motivation Proposed method Experiment result Conclusion

Outline • • 2 Motivation Proposed method Experiment result Conclusion

Outline • • 3 Motivation Proposed method Experiment result Conclusion

Outline • • 3 Motivation Proposed method Experiment result Conclusion

Motivation You have a heartbeat time series 4

Motivation You have a heartbeat time series 4

Motivation You know where the heartbeats are 5

Motivation You know where the heartbeats are 5

Motivation You can easily visualize heartbeats by mapping them into 2 D with algorithm

Motivation You can easily visualize heartbeats by mapping them into 2 D with algorithm like Multi. Dimensional Scaling (MDS) If the scatter plot and corresponding subsequences are shown to domain expert, the correct label can be easily recovered 6

Motivation Normal Best Abnormal Best You can easily visualize heartbeats by mapping them into

Motivation Normal Best Abnormal Best You can easily visualize heartbeats by mapping them into 2 D with algorithm like Multi. Dimensional Scaling (MDS) If the scatter plot and corresponding subsequences are shown to domain expert, the correct label can be easily recovered 7 Normal beats forms one cluster while abnormal beat forms two clusters

Motivation However, segmentation of time series is rarely available as annotation is usually expensive

Motivation However, segmentation of time series is rarely available as annotation is usually expensive (even if possible) 8

Motivation If we simply slide a window across the time series, the resulting scatter

Motivation If we simply slide a window across the time series, the resulting scatter plot is not interpretable because being forced to “explain” all subsequences is condemned to be meaningless [a] J. Lin, E. Keogh and W. Truppel, “Clustering of timeseries subsequences is meaningless: implications for previous and future research, ” in Knowledge and Information Systems, 2005. 9

Motivation This is a chicken-and-egg paradox as we only want to explain the subsequence

Motivation This is a chicken-and-egg paradox as we only want to explain the subsequence that explainable 10

Problem statement • 11

Problem statement • 11

Problem statement • 12 We want to find subsequences that produce meaningful low dimensional

Problem statement • 12 We want to find subsequences that produce meaningful low dimensional projection

Outline • • 13 Motivation Proposed method Experiment result Conclusion

Outline • • 13 Motivation Proposed method Experiment result Conclusion

Minimum description length principle • [a] https: //en. wikipedia. org/wiki/Minimum_description_length 14

Minimum description length principle • [a] https: //en. wikipedia. org/wiki/Minimum_description_length 14

Toy example in text • Given a string with relevant substring’s location a fat

Toy example in text • Given a string with relevant substring’s location a fat cat plays hide and seek in fog with dog fat cat 15 fog two rhyming pairs forms two clusters in the scatter plot (projected with hamming distance and MDS) dog

Toy example in text • Given a string without relevant substring’s location afatcatplayshideandseekinfogwithdog To

Toy example in text • Given a string without relevant substring’s location afatcatplayshideandseekinfogwithdog To make this string more like “time series”, spaces are removed 16

Toy example in text • Given a string without relevant substring’s location afatcatplayshideandseekinfogwithdog If

Toy example in text • Given a string without relevant substring’s location afatcatplayshideandseekinfogwithdog If each char requires 8 bits to store, total bits to store the string is 280 bits 17

Toy example in text • fat cat 18 fog dog

Toy example in text • fat cat 18 fog dog

Brute force solution • 19

Brute force solution • 19

Heuristic rule for approximate search • A subsequences with closer nearest neighbor is more

Heuristic rule for approximate search • A subsequences with closer nearest neighbor is more likely be a good hypothesis Neighbor pair 0 20 3, 000 float takes 96, 000 bits to store 3, 000

Heuristic rule for approximate search • A subsequences with closer nearest neighbor is more

Heuristic rule for approximate search • A subsequences with closer nearest neighbor is more likely be a good hypothesis noise section: 2, 400 float = 76, 800 bits pattern: 300 float = 9, 600 bits pattern position: 2 int = 64 bits Total = 86, 464 (was 96, 000) 0 21 3, 000

Matrix profile • T, synthetic data P, matrix profile 0 3, 000 local minimums

Matrix profile • T, synthetic data P, matrix profile 0 3, 000 local minimums are motifs By searching just the subsequences around the local minimums of matrix profile, good hypothesis set can be recovered more efficiently [a] http: //www. cs. ucr. edu/~eamonn/Matrix. Profile. html 22

Outline • • 23 Motivation Proposed method Experiment result Conclusion

Outline • • 23 Motivation Proposed method Experiment result Conclusion

Heartbeat Ground truth Our method Premature Contractions Ventricular Beats PVC Beats Type A Normal

Heartbeat Ground truth Our method Premature Contractions Ventricular Beats PVC Beats Type A Normal Beats 24 Normal Beats PVC Beats Type B False Positive

Heartbeat Ground truth Our method Premature Contractions Ventricular Beats PVC Beats Type A Normal

Heartbeat Ground truth Our method Premature Contractions Ventricular Beats PVC Beats Type A Normal Beats 25 Normal Beats PVC Beats Type B False Positive While A and B are both PVCs, their morphology (which is related to where in the ventricle they initiate) are different. It appears that type B is a right bundle branch pattern, coming from right side of the heart, and Type A is more likely to be the of the fusion of a normal beat and an aberrant beat. Moreover, there is also evidence of a retrograde P-wave in type B.

Human motions From this time series, our algorithm selects 11 subsequences They form three

Human motions From this time series, our algorithm selects 11 subsequences They form three clusters 26

Human motions When we check the class label for each subsequence, they are indeed

Human motions When we check the class label for each subsequence, they are indeed from different class Crouching Waving Bowing 27

Human motions Crouching Subsequence from the same cluster has very similar shape 0 60

Human motions Crouching Subsequence from the same cluster has very similar shape 0 60 120 Waving Bowing 28

Nursery rhyme: London bridge falling down (piano) Gb-Bb-Db F-Ab-Db Gb-Bb-Db. . fair lady, pin.

Nursery rhyme: London bridge falling down (piano) Gb-Bb-Db F-Ab-Db Gb-Bb-Db. . fair lady, pin. . What'll you take to set him fr. . …fair lady, buil. . What'll you take to set him fr. . My fair lady …. . man to watch all night broke my chain, broke my chain silver and gold, silver and. . silver and gold, silver and g… …d it up with penny loaves …it up with penny loaves 29

Small extension: from ED-MDS to DTW-MDS ED-MDS 30 DTW-MDS Because matrix profile + MDL

Small extension: from ED-MDS to DTW-MDS ED-MDS 30 DTW-MDS Because matrix profile + MDL is able to select a small set of subsequences, applying MDS with DTW is computable (some dataset requires DTW for warping invariance) miss walking very slow normal walking Nordic walking running cycling rope jumping

Outline • • 31 Motivation Proposed method Experiment result Conclusion

Outline • • 31 Motivation Proposed method Experiment result Conclusion

Conclusion • Project subsequences into 2 D space is a good way to explore

Conclusion • Project subsequences into 2 D space is a good way to explore time series data • We generally should not attempt to explain all the data, but rather only consider salient subsequences • Matrix profile + MDL can be used as the heuristic rules for selecting salient subsequence for visualization • Limitation: only repeated subsequence is selected, sometimes the more interested subsequence is the unique one (anomaly) 32