I'm stack in trying to plot a two-dimensional feature which has a mean of [2, 3] and standard deviation [0.4, 1.5], along the x and y axis, respectively.
Any idea?
Use numpy.random.normal
to generate N samples from a gaussian distribution, e.g.:
import numpy as np
xs = np.random.normal(loc=2, scale=0.4, size=100)
ys = np.random.normal(loc=3, scale=1.5, size=100)
As you might have guessed, loc
corresponds to the mean, and scale
to the standard deviation.