atomica.optimization.MinimizeMeasurable¶
- class atomica.optimization.MinimizeMeasurable(measurable_name, t, pop_names=None)[source]¶
Bases:
Measurable
Methods
eval
Return cached baseline values
Return objective value
- get_baseline(model)¶
Return cached baseline values
Similar to
get_hard_constraint
, sometimes a relativeMeasurable
might be desired e.g. ‘Reduce deaths by at least 50%’. In that case, we need to perform a procedure similar to getting a hard constraint, where theMeasurable
receives an initialModel
object and extracts baseline data for subsequent use inget_objective_val
.Thus, the output of this function is paired to its usage in
get_objective_val
.- Parameters:
model
- Returns:
The value to pass back to the
Measurable
during optimization
- get_objective_val(model, baseline)¶
Return objective value
This method should return the _unweighted_ objective value. Note that further transformation may occur