-
Notifications
You must be signed in to change notification settings - Fork 51
Refactor value at risk and add get_robust_trial API
#299
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
Conversation
get_robust_trial API
| _sign = np.array([-1.0 if d == StudyDirection.MINIMIZE else 1.0 for d in study.directions]) | ||
| y_train, _, _ = _standardize_values(_sign * np.array([trial.values for trial in trials])) |
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.
Why an underscore (_) is prefixed in the variable _sign?
Local variables starting with an underscore are usually used when the variables are never read, but here the _sign variable is read.
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.
Hi, thank you for the comments:)
I modified accordingly!
msakai
left a comment
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.
get_robust_trial looks good to me.
Contributor Agreements
Please read the contributor agreements and if you agree, please click the checkbox below.