Skip to content

Instantly share code, notes, and snippets.

@sidneyarcidiacono
Last active May 17, 2021 20:48
Show Gist options
  • Save sidneyarcidiacono/6b087ac46253e5a7710c019a4e3f7602 to your computer and use it in GitHub Desktop.
Save sidneyarcidiacono/6b087ac46253e5a7710c019a4e3f7602 to your computer and use it in GitHub Desktop.
Train/test split for Spektral tutorial
# 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