I created an autoencoder model and train it with image sequence dataset. The final result of testset is a reconstructed images. How can I plot ROC curve and calculate AUC?
Edited: This is my code:
model = AutoEncoder()
model.compile(loss='mse', optimizer='adam')
model.fit(dm, dm,
batch_size=batchSize,
epochs=epochs,
shuffle=False,
callbacks=callbacks_list, verbose=1
)
# load testset
....
reconstructed_sequences = model.predict(sequences,batch_size=1)
sequences_reconstruction_cost = np.array([np.linalg.norm(np.subtract(sequences[i],reconstructed_sequences[i])) for i in range(0,sz)])
sa = (sequences_reconstruction_cost - np.min(sequences_reconstruction_cost)) / np.max(sequences_reconstruction_cost)
sr = 1.0 - sa
where sr is a final result containing the score of my detection.