Created
May 30, 2020 16:48
-
-
Save Vsanku01/a36bb5c878ca56d9cc8a8f1755261998 to your computer and use it in GitHub Desktop.
Split the sine wave data into test and train datasets
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
len(df) # 501 | |
test_pecent = 0.1 # 10 percent of data | |
len(df)*test_pecent # 50.1 | |
test_point = np.round(len(df)*test_pecent) # 50.0 | |
test_index = int(len(df) - test_point) #451 | |
train = df.iloc[:test_index] | |
test = df.iloc[test_index:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment