samedi 29 juin 2019

Is there a way i can generate multiple datasets using the numpy random number generator from a distribution

I am attempting to generate multiple random datasets (50) of a normal distribution with 100 random numbers using different seeds in the random number generator for each dataset. And then plot all 50 samples on the same graph

I can do this for one data set but not sure how to achieve this for 50 different random generators in a single code

import numpy as np
import matplotlib.pyplot as plt
seed = 15
r=np.random.RandomState(seed)
data=r.normal(size=100)  # length= 100
plt.plot(data)
plt.show()




Aucun commentaire:

Enregistrer un commentaire