Skip to content
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

Improve reproducibility in utils_math.py #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dustalov
Copy link

This update makes the following improvements to utils_math.py:

  1. Replaced the raw tqdm(range()) call with the more specific tqdm.auto.trange() call for enhanced compatibility in various environments (e.g., notebooks).
  2. Added random state handling in get_bootstrap_result to ensure reproducibility during sampling. Instead of relying on the global random state here, our random state depends on different seed values for each sampling round.
  3. Refactored the random seed initialization using np.random.default_rng in get_bootstrap_result_style_control, improving randomness consistency across the module.

As a result, the CIs become more consistent between different runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant