I'm trying to make the MNIST dataset noisy based on an article where noises were added by percentage. I don't know how to calculate the percentage of noise added to an image.
Here is my Python code:
from keras.datasets import mnist
import numpy as np
(X_train, y_train), (X_test, y_test) = mnist.load_data()
X_train = X_train.astype('float32')
X_test = X_test.astype('float32')
X_train /= 255
X_test /= 255
noise_factor = 0.5
x_train_noisy = X_train + noise_factor * np.random.normal(loc=0.0, scale=1.0, size=X_train.shape)
x_test_noisy = X_test + noise_factor * np.random.normal(loc=0.0, scale=1.0, size=X_test.shape)
x_train_noisy = np.clip(x_train_noisy, 0., 1.)
x_test_noisy = np.clip(x_test_noisy, 0., 1.)
1.Is the percentage of this noise 50% (based on noise_factor)? Can noise factor show us the percentage?
2.Are there other ways to add noise with percentage?
3.Are deterministic distribution and non-random same things? I saw an article where they added noise with percentage and based on deterministic distribution but looked for it and got nothing.