We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am playing with the latin hypercube samper and was wondering if there is a way to set the random seed somewhere. Thanks, Holger
The text was updated successfully, but these errors were encountered:
Calling np.random.seed() before each call should do it.
np.random.seed()
>>> import numpy as np >>> import pyDOE >>> pyDOE.lhs(2, 5) array([[ 0.70104734, 0.67737853], [ 0.04406124, 0.24034865], [ 0.52808135, 0.06996526], [ 0.95872749, 0.91600084], [ 0.2935575 , 0.49661397]]) >>> pyDOE.lhs(2, 5) array([[ 0.37079506, 0.6130573 ], [ 0.70104922, 0.29884737], [ 0.5693123 , 0.81930618], [ 0.88562447, 0.15706703], [ 0.03688797, 0.4159291 ]]) >>> np.random.seed(2) >>> pyDOE.lhs(2, 5) array([[ 0.64092973, 0.28706448], [ 0.48407356, 0.85336546], [ 0.3099325 , 0.00518525], [ 0.08719898, 0.46606696], [ 0.85993093, 0.72385419]]) >>> np.random.seed(2) >>> pyDOE.lhs(2, 5) array([[ 0.64092973, 0.28706448], [ 0.48407356, 0.85336546], [ 0.3099325 , 0.00518525], [ 0.08719898, 0.46606696], [ 0.85993093, 0.72385419]])
Sorry, something went wrong.
The above does not seem to work (anymore). pyDOE2 has an option to pass a 'random_state' value though.
No branches or pull requests
Hi,
I am playing with the latin hypercube samper and was wondering if there is
a way to set the random seed somewhere.
Thanks,
Holger
The text was updated successfully, but these errors were encountered: