vendredi 2 avril 2021

How do I generate correlated random numbers in Python?

How do I create a set of n vectors of dimensionality d such that elements have correlation c (i.e., if a vector has one large element, the other elements are likely to be large)?

For demonstration, let's say n=5, d=3, and c=0.7.

Is there some way to set up conv here: https://numpy.org/doc/stable/reference/random/generated/numpy.random.multivariate_normal.html

This may be too much to ask, but what if I want the numbers drawn from a normal distribution?

Thanks!




Aucun commentaire:

Enregistrer un commentaire