-1

Generate a 1000 two-dimensional dataset, X that is of two classes and plot. The 1 500 data vectors are modeled by the Gaussian distribution with mean, m1 = [­ 8, 8] T and the rest 500 data vectors are modeled by the Gaussian distribution with mean m2 = [­ 8, 8] . The covariance matrix for both distributions are T S = [0.3 1.5 1.5 9.0 ] Use the same prescription to generate another data 200 and create a test dataset X .

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

0

Using numpy.random.multivariate_normal you can do that. Using the info you provided, you can do something like:

mean = [8,8]
cov = [[0.3, 1.5], [1.5, 9.0]]
x, y = np.random.multivariate_normal(mean, cov, 200).T
rikyeah
  • 1,896
  • 4
  • 11
  • 21