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

Allow explicit control of randomness for ensembling #485

Open
Jacob-Stevens-Haas opened this issue Mar 25, 2024 · 0 comments
Open

Allow explicit control of randomness for ensembling #485

Jacob-Stevens-Haas opened this issue Mar 25, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Jacob-Stevens-Haas
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

EnsembleOptimizer uses _drop_random_samples() and np.random.choice to determine which data/features are involved in each bag. When running experiments, you can create reproducible ensembles by setting numpy.random.seed. However, when reading experiments, its easy to overlook that this seed is actually used, because it mutates global state, a form of spooky action at a distance. Worse, if someone thinks that it isn't used, deleting np.random.seed(seed) won't cause errors.

The solution is to be explicit at least with setting the seed. Relevant Jax philosophy.

Describe the solution you'd like

EnsembleOptimizer accepts a rand_gen: np.random.Generator object.

Describe alternatives you've considered

EnsembleOptimizer accepts a seed: int object.

@Jacob-Stevens-Haas Jacob-Stevens-Haas added enhancement New feature or request good first issue Good for newcomers labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant