Created
October 12, 2021 15:45
-
-
Save Steboss/84b48aea9709f9e35843a04be4e83446 to your computer and use it in GitHub Desktop.
Input data form sequences
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
for random_walk in random_walks: | |
N = len(random_walk) | |
#print(random_walk) | |
for i in range(N): | |
idxs_left = np.arange(max(0, i-window_size), i).tolist() | |
idxs_right = np.arange(i+1, min(N, i+window_size+1)).tolist() | |
for j in idxs_left: | |
X.append(random_walk[i]) | |
y.append(random_walk[j]) | |
for j in idxs_right: | |
X.append(random_walk[i]) | |
y.append(random_walk[j]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment