-
Notifications
You must be signed in to change notification settings - Fork 7
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
Updating optimize
to handle multiple risk constraints
#596
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
optimize
to handle multiple risk constraints
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.
Looks good overall! That said, I think it would be helpful to refine the types and avoid squeeze
where possible. See individual comments for details.
end_time: float, | ||
logging_step_size: float, | ||
*, | ||
start_time: float = 0.0, | ||
risk_measure: Callable = lambda z: alpha_superquantile(z, alpha=0.95), |
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.
Nitpick: Could we rename this argument risk_measures
?
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.
We could but I wonder what would be the downstream effects of changing the name here. I am guessing it should be doable...
All the |
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.
Looks great!
@anirban-chaudhuri Suppose I want the following "success criteria" or "constraints":
observed_params = [["S_state"], ["S_state"]]
risk_bound = [1.0, -2.0]
alpha = [0.95, 0.95]
qoi = [
lambda y: obs_max_qoi(y, observed_params[0]),
lambda y: -obs_nday_average_qoi(y, observed_params[1])
] Is the minus sign on the risk bound and |
Also, how is I'd have expected it to be just |
risk_bound
,alpha
, andqoi
to be List.