Bernstein_Poster_2024/plot_noise_holes_w_noise.py

138 lines
2.3 KiB
Python
Raw Normal View History

2024-11-05 18:20:02 +01:00
import numpy as np
import matplotlib.pyplot as plt
number_of_noise_steps = 20
noise_scale = np.arange(0, number_of_noise_steps + 1) / float(
number_of_noise_steps
)
# 1x
data = np.load("avg_pooling_mlp/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
label="MLP"
)
data = np.load("basis_mlp/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
label="MLP Basis"
)
data = np.load("avg_pooling_nnmf/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
label="NNMF"
)
data = np.load("avg_pooling_nnmf_sp1.01/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
label="NNMF Sparse 1.01"
)
data = np.load("basis_nnmf/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
label="NNMF Basis"
)
# 2x
data = np.load("avg_pooling_mlp_x2/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
":",
label="MLP x2"
)
data = np.load("basis_mlp_x2/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
":",
label="MLP Basis x2"
)
data = np.load("avg_pooling_nnmf_x2/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
":",
label="NNMF x2"
)
data = np.load("avg_pooling_nnmf_sp1.01_x2/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
":",
label="NNMF Sparse 1.01 x2"
)
data = np.load("basis_nnmf_x2/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
":",
label="NNMF Basis x2"
)
# 4x
data = np.load("avg_pooling_mlp_x4/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
"--",
label="MLP x4"
)
data = np.load("basis_mlp_x4/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
"--",
label="MLP Basis x4"
)
data = np.load("avg_pooling_nnmf_x4/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
"--",
label="NNMF x4"
)
data = np.load("avg_pooling_nnmf_sp1.01_x4/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
"--",
label="NNMF Sparse 1.01 x4"
)
data = np.load("basis_nnmf_x4/noise_holes_w_noise_results.npy")
plt.plot(
noise_scale,
data,
"--",
label="NNMF Basis x4"
)
plt.legend()
plt.xlabel("eta")
plt.ylabel("Performance [%]")
plt.title("CIFAR10 Random Holes filled with rand")
plt.show()