Last active
May 17, 2021 20:48
-
-
Save sidneyarcidiacono/6b087ac46253e5a7710c019a4e3f7602 to your computer and use it in GitHub Desktop.
Train/test split for Spektral tutorial
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
# Split our train and test data. This just splits based on the first 80%/second 20% which isn't entirely ideal, so we'll shuffle the data first. | |
import numpy as np | |
np.random.shuffle(data) | |
split = int(0.8 * len(data)) | |
data_train, data_test = data[:split], data[split:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment