Reputation: 155
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?
Upvotes: 0
Views: 205
Reputation: 14462
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.
Upvotes: 1