Created
January 15, 2020 16:15
-
-
Save a-agmon/39f0050cf3b84b571c156f0315529fbb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#encode all the data | |
encoded_seqs = encode_sequence_list(seqs_ds.iloc[:,0]) | |
#scale it | |
scaled_data = MinMaxScaler().fit_transform(encoded_seqs) | |
#predict it | |
predicted = autoencoder.predict(scaled_data) | |
#get the error term | |
mse = np.mean(np.power(scaled_data - predicted, 2), axis=1) | |
#now add them to our data frame | |
seqs_ds['MSE'] = mse | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment