-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from baggepinnen/slidingdistances
work on supporting sliding distances
- Loading branch information
Showing
5 changed files
with
76 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using MatrixProfile | ||
# Download data from https://sites.google.com/site/snippetfinderinfo/home/MixedBag.zip | ||
datapath = "/tmp/MixedBag/" | ||
cd(datapath) | ||
|
||
## Some data | ||
T = parse.(Int, split(join(Char.(read("01911m_02019m_III_7680_200.txt"))), ',')) | ||
profile, snips, Cfracs = snippets(T, 3, 100, 50) | ||
plot(plot(snips, layout = (1, 3), size = (800, 200)), plot(profile, snips, legend = false)) | ||
|
||
## Power demand | ||
T = parse.(Float32, readlines("Powerdemand_12_4500_200.txt")) | ||
profile, snips, Cfracs = snippets(T, 4, 24, 12) | ||
plot(plot(snips, size = (800, 200), xrotation=45), plot(profile, snips, legend = false, link=:none)) | ||
|
||
profile = matrix_profile(T, 24) | ||
mot = motifs(profile, 4, 3, 48) | ||
plot(profile, mot, legend=false) | ||
plot(mot) | ||
|
||
|
||
## Robot dog | ||
T = parse.(Float32, readlines("RoboticDogActivityY_64_4000_400.txt")) | ||
profile, snips, Cfracs = snippets(T, 4, 100, 10) | ||
plot(plot(snips, size = (800, 200), xrotation=45), plot(profile, snips, legend = false, link=:none)) | ||
|
||
profile = matrix_profile(T, 100) | ||
mot = motifs(profile, 4, 2, 200) | ||
plot(profile, mot, legend=false) | ||
plot(mot) | ||
|
||
using DynamicAxisWarping | ||
|
||
profile = matrix_profile(T, 100, DTWDistance(DTW(3))) | ||
mot = motifs(profile, 4, 2, 200) | ||
plot(profile, mot, legend=false) | ||
plot(mot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters