gemseo /
algos /
opt /
core
trust_updater module
Updates a trust parameter according to a decreases’ ratio.
-
class gemseo.algos.opt.core.trust_updater.BoundsUpdater(lower_bounds, upper_bounds, normalize=False)[source]
Bases: object
Updater of the trust bounds, i.e. trust ball w.r.t.
the infinity norm.
- Parameters:
lower_bounds (ndarray) – The reference lower bounds.
upper_bounds (ndarray) – The reference upper bounds.
normalize (bool) –
Whether to apply the radius to the normalized bounds.
By default it is set to False.
-
update(radius, center)[source]
Update the trust bounds.
- Parameters:
-
- Returns:
The updated lower and upper bounds of the trust region.
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
-
class gemseo.algos.opt.core.trust_updater.PenaltyUpdater(thresholds=(0.0, 0.25), multipliers=(0.5, 2.0), bound=1e-06)[source]
Bases: TrustUpdater
Update the penalty parameter.
- Parameters:
thresholds (tuple[float, float]) –
The thresholds for the decreases’ ratio.
By default it is set to (0.0, 0.25).
multipliers (tuple[float, float]) –
The multipliers for the trust parameter.
By default it is set to (0.5, 2.0).
bound (float) –
The absolute bound for the trust parameter.
By default it is set to 1e-06.
-
update(ratio, parameter)[source]
Update the trust parameter relative to the decrease ratio value.
Method to be overridden by subclasses.
- Parameters:
-
- Returns:
The new trust parameter, the iteration success.
- Return type:
tuple[float, bool]
-
docstring_processor(parent_doc: Optional[str], child_func: Callable) → None: Callable[[Optional[str], Callable], str] = <docstring_inheritance.processors.google.GoogleDocstringProcessor object>
- Parameters:
-
- Return type:
None
-
class gemseo.algos.opt.core.trust_updater.RadiusUpdater(thresholds=(0.0, 0.25), multipliers=(0.5, 2.0), bound=1000.0)[source]
Bases: TrustUpdater
Update the radius of the trust region.
- Parameters:
thresholds (tuple[float, float]) –
The thresholds for the decreases’ ratio.
By default it is set to (0.0, 0.25).
multipliers (tuple[float, float]) –
The multipliers for the trust parameter.
By default it is set to (0.5, 2.0).
bound (float) –
The absolute bound for the trust parameter.
By default it is set to 1000.0.
-
update(ratio, parameter)[source]
Update the trust parameter relative to the decrease ratio value.
Method to be overridden by subclasses.
- Parameters:
-
- Returns:
The new trust parameter, the iteration success.
- Return type:
tuple[float, bool]
-
docstring_processor(parent_doc: Optional[str], child_func: Callable) → None: Callable[[Optional[str], Callable], str] = <docstring_inheritance.processors.google.GoogleDocstringProcessor object>
- Parameters:
-
- Return type:
None
-
class gemseo.algos.opt.core.trust_updater.TrustUpdater(thresholds, multipliers, bound=None)[source]
Bases: object
Updater of a trust parameter.
- Parameters:
thresholds (tuple[float, float]) – The thresholds for the decreases’ ratio.
multipliers (tuple[float, float]) – The multipliers for the trust parameter.
bound – The absolute bound for the trust parameter.
-
update(ratio, parameter)[source]
Update the trust parameter relative to the decrease ratio value.
Method to be overridden by subclasses.
- Parameters:
-
- Returns:
The new trust parameter, the iteration success.
- Return type:
tuple[float, bool]
-
docstring_processor(parent_doc: Optional[str], child_func: Callable) → None: Callable[[Optional[str], Callable], str] = <docstring_inheritance.processors.google.GoogleDocstringProcessor object>
- Parameters:
-
- Return type:
None