-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
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
Add random_seed parameter #28
Conversation
Allows user to input a random_seed for repeating runs. If None, does not use random_seed.
@nickkunz The modifications here have been tested with the |
@ArnoldYSYeung Thanks for your sharing. In fact I also used the same strategy to deal with my problem. I try to implant random seed for several rows in smoter/over_sampling files. Unfortunately it doesn't solve the problem completely, and only increase the reproducibility of test results. I don't know if you have the same situation? And I will use your modifications to do the same test. |
@Muti23 my understanding after reading the code, that you need to fix seed for both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ArnoldYSYeung can you remove the locally generated pycache files?
@ArnoldYSYeung @Muti23 @polinamamo thank you all for your input. This is very helpful for everyone using the package. |
@polinamamo Are you suggesting we should include Right now, my PR only includes one when the following lines use that specific random seed. (E.g., only |
- Rename `random_seed` variable to `seed` - Remove pycache files
@nickkunz Renamed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ArnoldYSYeung Can we merge this to the dev branch before we merging to master?
@nickkunz Changed base branch from |
@ArnoldYSYeung Thank you. I really appreciate your contribution. This needed to be done. |
Allows user to input a random_seed for repeating runs. If None, does not use random_seed.
Code has been fixed to apply to every instance of np.random and rd.random. (Seed must be defined prior to every use of np.random and rd.random.)
Code has been tested on
smogn/examples/smogn_example_1_beg.ipynb
. Using the samerandom_seed
value always output the same stats.