Skip to content
Snippets Groups Projects
Commit 14441988 authored by Abanda Elustondo, Amaia's avatar Abanda Elustondo, Amaia
Browse files

plots

parent f0b5b312
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,7 @@ def majority_vote_for_instances(labels_list):
return majority_votes
def plot_reconstructions(test_x, reconstruction, ind= 0):
def plot_reconstructions(test_x, test_y, reconstruction, ind= 0):
plt.rcParams["font.size"] = 24
# plt.figure()
......@@ -243,7 +243,6 @@ def plot_reconstructions(test_x, reconstruction, ind= 0):
# plt.ylabel("Wind Speed")
# plt.tight_layout()
ind=27
plt.figure()
plt.plot(test_x[ind, :, 0].numpy()-reconstruction[0, :, 0])
......
......@@ -198,7 +198,7 @@ if __name__ == "__main__":
)
plot_reconstructions(test_x= testD, reconstruction=reconstruction)
plot_reconstructions(test_x= testD, test_y= test_y, reconstruction=reconstruction)
if model_name == "basic_autoencoder":
loss_test = loss_test.reshape(
......
......@@ -136,7 +136,8 @@ if __name__ == "__main__":
recons_train = model.predict(trainD)
reconstruction = model.predict(testD)
ind = 27
ind = 0
# ind = 27
plt.rcParams["font.size"] = 24
......@@ -163,8 +164,6 @@ if __name__ == "__main__":
# plt.plot(test_y[ind*120:(ind+1)*120])
# plt.tight_layout()
plt.figure()
plt.plot(testD[ind, :, 0] - reconstruction[0, :, 0], label="Reconstrucion")
plt.xlabel("Time")
......@@ -190,7 +189,6 @@ if __name__ == "__main__":
plt.ylim(-0.4, 0.5)
plt.tight_layout()
loss_test = np.mean(np.abs(reconstruction - testD), axis=2).ravel()
# plt.style.use("seaborn-v0_8")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment