Last active
April 15, 2020 01:57
-
-
Save Muhammad-Yunus/3fc30895bb68ca447536f85d3bd8083e to your computer and use it in GitHub Desktop.
MLP ODE Timeseries
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
| def split_sequence(sequence, n_steps): | |
| _X, _y = list(), list() | |
| for i in range(len(sequence)): | |
| # find the end of this pattern | |
| end_ix = i + n_steps | |
| # check if we are beyond the sequence | |
| if end_ix > len(sequence)-1: | |
| break | |
| # gather input and output parts of the pattern | |
| seq_x, seq_y = sequence[i:end_ix], sequence[end_ix] | |
| _X.append(seq_x) | |
| _y.append(seq_y) | |
| return np.array(_X), np.array(_y) | |
| #split data ODE Critical Dumped | |
| x, y = split_sequence(Critical_Dumped, n_sampling) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment