Skip to content

Instantly share code, notes, and snippets.

@a-agmon
Created January 15, 2020 05:17
Show Gist options
  • Save a-agmon/60de2b43875c0f3125974b6a63b84779 to your computer and use it in GitHub Desktop.
Save a-agmon/60de2b43875c0f3125974b6a63b84779 to your computer and use it in GitHub Desktop.
#Scale our data using a MinMaxScaler that will scale
#each number so that it will be between 0 and 1
from sklearn.preprocessing import StandardScaler, MinMaxScaler
scaler = MinMaxScaler()
scaled_seqs = scaler.fit_transform(encoded_seqs)
#Create a test and train sets of our data
X_train = scaled_seqs[:20000]
X_test = scaled_seqs[20000:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment