Skip to content
Advertisement

How can i give Gaussian noise to my moons dataset with a deviation value of 0.2 in python?

I have make_moons dataset, generated by scikit-learn

X, y = make_moons(n_samples=120)

How can i give Gaussian noise to my moons dataset with a deviation value of 0.2 in python?

Advertisement

Answer

You can just pass that value to the make_moons function as noise.

x, y = make_moons(n_samples=120, noise=0.2)

noise : double or None (default=None) Standard deviation of Gaussian noise added to the data.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement