Types¶
- class optimagic.typing.AggregationLevel[source]¶
Enum to specify the aggregation level of objective functions and solvers.
- SCALAR = 'scalar'¶
- LEAST_SQUARES = 'least_squares'¶
- LIKELIHOOD = 'likelihood'¶
- class optimagic.typing.Direction[source]¶
Enum to specify the direction of optimization.
- MINIMIZE = 'minimize'¶
- MAXIMIZE = 'maximize'¶
- __new__(value)¶
- class optimagic.typing.DictLikeAccess[source]¶
Useful base class for replacing string-based dictionaries with dataclass instances and keeping backward compatability regarding read access to the data structure.
- values() ValuesView[str] [source]¶
- class optimagic.typing.TupleLikeAccess[source]¶
Useful base class for replacing tuples with dataclass instances and keeping backward compatability regarding read access to the data structure.
- class optimagic.typing.ErrorHandling[source]¶
Enum to specify the error handling strategy of the optimization algorithm.
- RAISE = 'raise'¶
- RAISE_STRICT = 'raise_strict'¶
- CONTINUE = 'continue'¶
- class optimagic.typing.EvalTask[source]¶
Enum to specify the task of the evaluation function.
- FUN = 'fun'¶
- JAC = 'jac'¶
- FUN_AND_JAC = 'fun_and_jac'¶
- EXPLORATION = 'exploration'¶
- optimagic.typing.PositiveInt¶
Type alias for positive integers (greater than 0).
alias of
Annotated
[int
,Gt
(gt=0)]
- optimagic.typing.NonNegativeInt¶
Type alias for non-negative integers (greater than or equal to 0).
alias of
Annotated
[int
,Ge
(ge=0)]
- optimagic.typing.PositiveFloat¶
Type alias for positive floats (greater than 0).
alias of
Annotated
[float
,Gt
(gt=0)]
- optimagic.typing.NonNegativeFloat¶
Type alias for non-negative floats (greater than or equal to 0).
alias of
Annotated
[float
,Ge
(ge=0)]
- optimagic.typing.ProbabilityFloat¶
Type alias for probability floats (between 0 and 1, inclusive).
alias of
Annotated
[float
,Ge
(ge=0),Le
(le=1)]
- optimagic.typing.NegativeFloat¶
Type alias for negative floats (less than 0).
alias of
Annotated
[float
,Lt
(lt=0)]
- optimagic.typing.GtOneFloat¶
Type alias for floats greater than 1.
alias of
Annotated
[float
,Gt
(gt=1)]
- optimagic.typing.UnitIntervalFloat¶
Type alias for floats in (0, 1].
alias of
Annotated
[float
,Gt
(gt=0),Le
(le=1)]
- optimagic.typing.YesNoBool¶
Type alias for boolean values represented as ‘yes’ or ‘no’ strings or as boolean values.
- optimagic.typing.DirectionLiteral¶
Type alias for optimization direction, either ‘minimize’ or ‘maximize’.
alias of
Literal
[‘minimize’, ‘maximize’]
- optimagic.typing.BatchEvaluatorLiteral¶
Type alias for batch evaluator types, can be ‘joblib’, ‘pathos’, or ‘threading’.
alias of
Literal
[‘joblib’, ‘pathos’, ‘threading’]
- optimagic.typing.ErrorHandlingLiteral¶
Type alias for error handling strategies, can be ‘raise’ or ‘continue’.
alias of
Literal
[‘raise’, ‘continue’]
- class optimagic.typing.IterationHistory[source]¶
History of iterations in a process.
- criterion¶
A list of criterion values obtained in each iteration.
- runtime¶
A list or array of runtimes associated with each iteration.
- class optimagic.typing.MultiStartIterationHistory[source]¶
History of multiple start iterations.
- history¶
The main iteration history, representing the best end value.
- local_histories¶
Optional, a list of local iteration histories.
- Type:
- exploration¶
Optional, iteration history for exploration steps.
- Type:
- history: IterationHistory¶
- local_histories: list[IterationHistory] | None = None¶
- exploration: IterationHistory | None = None¶