Last active
August 1, 2022 18:58
-
-
Save andrea-dagostino/37b31626926fd4bf9a72d04d4af29fe5 to your computer and use it in GitHub Desktop.
ts_clustering
This file contains hidden or 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
| N = 15 # window size --> we can tweak it and test different options | |
| K = 0.70 # split size --> 80% of the data is in A, 20% in B | |
| SEQS = split_time_series(list(data['Close'].values), N) # creates sequences of length N | |
| SPLIT_SEQS = split_sequences(SEQS, K) # splits sequences into individual sequences | |
| A = [seq[0] for seq in SPLIT_SEQS] | |
| B = [seq[1] for seq in SPLIT_SEQS] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment