Constants

This module provides a central place to define native python enums and constants that are used in multiple other modules

Classes Summary

ExitFlag(value[, names, module, qualname, ...])

Defines possible exitflag values for the optimizer to indicate why optimization exited.

Options(value[, names, module, qualname, ...])

Defines all the fields that can be specified in Options to Optimizer

StepBackStrategy(value[, names, module, ...])

Defines the possible choices of search refinement if proposed step reaches optimization boundary

SubSpaceDim(value[, names, module, ...])

Defines the possible choices of subspace dimension in which the subproblem will be solved.

Functions Summary

validate_options(options)

Check if the chosen options are valid

Classes

class fides.constants.ExitFlag(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines possible exitflag values for the optimizer to indicate why optimization exited. Negative value indicate errors while positive values indicate convergence.

DELTA_TOO_SMALL = -5

Trust Region Radius too small to proceed

DID_NOT_RUN = 0

Optimizer did not run

EXCEEDED_BOUNDARY = -4

Exceeded specified boundaries

FTOL = 1

Converged according to fval difference

GTOL = 3

Converged according to gradient norm

MAXITER = -1

Reached maximum number of allowed iterations

MAXTIME = -2

Expected to reach maximum allowed time in next iteration

NOT_FINITE = -3

Encountered non-finite fval/grad/hess

XTOL = 2

Converged according to x difference

class fides.constants.Options(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines all the fields that can be specified in Options to Optimizer

DELTA_INIT = 'delta_init'

initial trust region radius

ETA = 'eta'

trust region increase threshold for trust region ratio

FATOL = 'fatol'

absolute tolerance for convergence based on fval

FRTOL = 'frtol'

relative tolerance for convergence based on fval

GAMMA1 = 'gamma1'

factor by which trust region radius will be decreased

GAMMA2 = 'gamma2'

factor by which trust region radius will be increased

GATOL = 'gatol'

absolute tolerance for convergence based on grad

GRTOL = 'grtol'

relative tolerance for convergence based on grad

HISTORY_FILE = 'history_file'

when set, statistics for each start will

MAXITER = 'maxiter'

maximum number of allowed iterations

MAXTIME = 'maxtime'

maximum amount of walltime in seconds

MU = 'mu'

acceptance threshold for trust region ratio

STEPBACK_STRAT = 'stepback_strategy'

method to use for stepback

SUBSPACE_DIM = 'subspace_solver'

trust region subproblem subspace

THETA_MAX = 'theta_max'

maximal fraction of step that would hit bounds

XTOL = 'xtol'

tolerance for convergence based on x

class fides.constants.StepBackStrategy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the possible choices of search refinement if proposed step reaches optimization boundary

MIXED = 'mixed'

mix reflections and truncations

REFINE = 'refine'

perform optimization to refine step

REFLECT = 'reflect'

recursive reflections at boundary

SINGLE_REFLECT = 'reflect_single'

single reflection at boundary

TRUNCATE = 'truncate'

truncate step at boundary and re-solve

class fides.constants.SubSpaceDim(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the possible choices of subspace dimension in which the subproblem will be solved.

FULL = 'full'

Full \(\mathbb{R}^n\)

STEIHAUG = 'scg'

CG subspace via Steihaug’s method

TWO = '2D'

Two dimensional Newton/Gradient subspace

Functions

fides.constants.validate_options(options)[source]

Check if the chosen options are valid