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

Optimize should allow observables as the observed_param #589

Closed
sabinala opened this issue Jul 10, 2024 · 4 comments
Closed

Optimize should allow observables as the observed_param #589

sabinala opened this issue Jul 10, 2024 · 4 comments

Comments

@sabinala
Copy link
Contributor

Currently, optimize can only use state variables in the QoI, but we should be able to use observables as well.

@liunelson
Copy link
Contributor

@anirban-chaudhuri
If we have this feature, along with multiple Optimize constraints/qoi/success criteria, might we be able to solve Scenario 2 Q1 problem of theta >= 2 * epsilon?

That is, edit the model to include a new observable f = theta - 2 * epsilon and choose f as a second constraint (with risk_bound = 0.0) in Optimize?

Something like:

qoi = [lambda y: obs_max_qoi(samples, contexts = ["TotalInfected"]), lambda y: obs_max_qoi(samples, context = ["f"])]

where the two observables were added to the model AMR using MIRA:

model_sidarthe.observables["TotalInfected"] = mira.metamodel.template_model.Observable(
    name = "TotalInfected", 
    expression = sympy.Symbol("Infected") + sympy.Symbol("Diagnosed") + sympy.Symbol("Ailing") + sympy.Symbol("Recognized") + sympy.Symbol("Threatened")
)
model_sidarthe.observables["f"] = mira.metamodel.template_model.Observable(
    name = "f", 
    expression = sympy.Symbol("theta") - 2* sympy.Symbol("epsilon")
)

@SamWitty
Copy link
Contributor

Is this addressed now with #602?

@liunelson
Copy link
Contributor

This should be it!

@anirban-chaudhuri
Copy link
Contributor

Seems that this is already addressed.

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

No branches or pull requests

4 participants