Skip to content

Instantly share code, notes, and snippets.

@Vsanku01
Created May 30, 2020 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vsanku01/a36bb5c878ca56d9cc8a8f1755261998 to your computer and use it in GitHub Desktop.
Save Vsanku01/a36bb5c878ca56d9cc8a8f1755261998 to your computer and use it in GitHub Desktop.
Split the sine wave data into test and train datasets
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