Skip to content

Stochastic behaviour even after setting random.seed() #8041

@gan3sh500

Description

@gan3sh500

numpy.random.multivariate_normal() result is not reproducible even if numpy.random.seed() is set.
np.random.seed(9) class1 = np.random.multivariate_normal(mean, cov, n_samples) class2 = np.random.multivariate_normal(mean, cov, n_samples)
class1 won't be the same as class2. When I generate mean and cov with np.random.rand() it is reproducible. cov is a positive semi-definite matrix I generated using np.dot(A,A.T) where A is generated with random.rand()

This was on Python 2.7.12 with Numpy 1.11.1 on Ubuntu 16.04.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions