BioSTEAMDevelopmentGroup / Bioindustrial-Park

BioSTEAM's Premier Repository for Biorefinery Models and Results
MIT License
36 stars 17 forks source link

Consultation about seed setting in uncertainty analysis in BioSTEAM #122

Closed zasddsgg closed 1 month ago

zasddsgg commented 2 months ago

Hello, could I ask you some questions about seed setting in uncertainty analysis in BioSTEAM. Thanks for your help. Wish you a good day.

  1. Can 1234 in np.random.seed(1234) in https://biosteam.readthedocs.io/en/latest/tutorial/Uncertainty_and_sensitivity.html#Monte-Carlo:~:text=np.random.seed(1234) be changed to some other number, such as 1?

  2. The evaluate_uncertainties of lactic acid (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/lactic/analyses/1_uncertainties.py#L30) do not appear to execute random number. Should I set the random number np.random.seed(1234) when doing uncertainty analysis? If executed, can the number in np.random.seed() be set arbitrarily? When Monte Carlo is simulated 1000 times, is np.random.seed(1234) executed once for each simulation?

yalinli2 commented 1 month ago

You don't need to set a random number see, or you can set it to whichever value you like, it's just a number to get consistent random numbers in generation of the uncertainty parameters.

zasddsgg commented 1 month ago

So when performing both uncertainty analysis and global sensitivity analysis in my own process, I don't need to add the code np.random.seed(1234), right?

yalinli2 commented 1 month ago

Since you are asking this question, I sense that you don't know what seed is for. So I suggest you don't add that code.

zasddsgg commented 1 month ago

I got it. Thanks for your help again.