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

Add random_state to HyperparameterOptimization class - Fixes for #125 #131

Merged
merged 14 commits into from
Jan 31, 2024
2 changes: 1 addition & 1 deletion luminaire/optimization/hyperparameter_optimization.py
Original file line number Diff line number Diff line change
@@ -305,7 +305,7 @@ def _optimize(self, data, objective_part, algo=tpe.suggest, max_evals=50):
raise ValueError('Only `detection_type=OutlierDetection` is supported in hyperparameter optimization right now')

# Calling the optimization function
hyper_param = fmin(objective, space=space, algo=algo, max_evals=max_evals, show_progressbar=True)
hyper_param = fmin(objective, space=space, algo=algo, max_evals=max_evals, show_progressbar=True, rstate=self.random_state)
hyper_param['LuminaireModel'] = hyper_param_list[hyper_param['LuminaireModel']]['model']
if 'max_ft_freq' in hyper_param:
hyper_param['max_ft_freq'] = hyper_param['max_ft_freq'] + 2