bertini.endgame¶
Endgame-specific things – endgames, configs¶
Endgames allow the computation of singular endpoints.
Flavors¶
There are two basic flavors of endgame implemented:
Power Series, commonly written PS or PSEG
Cauchy
Both estimate the cycle number and use it to compute a root at a time which is never tracked to. PSEG uses Hermite interpolation and extrapolation, and Cauchy uses loops around the target time coupled with the Cauchy integral formula. Both continue until two successive approximations of the root match to a given tolerance (bertini.endgame.EndgameConfig.final_tolerance).
The implementations of the endgames go with a particular tracker, hence there are six provided endgame types. Choose the one that goes with your selected tracker type. Adaptive Multiple Precision is a good choice.
Implementation reference¶
AMP Endgames¶
Fixed Double Precision Endgames¶
Fixed Multiple Precision Endgames¶
- class bertini.endgame.CauchyConfig((object)arg1)¶
Bases:
instanceSettings specific to the Cauchy endgame for computing singular endpoints
- __init__((object)arg1) None¶
- property cycle_cutoff_time¶
None( (bertini._pybertini.endgame.CauchyConfig)arg1) -> float
- property fail_safe_maximum_cycle_number¶
max number of loops before giving up.
- classmethod from_dict(mapping)¶
Build a config from a dict (default-constructs, then update()).
- property maximum_cauchy_ratio¶
None( (bertini._pybertini.endgame.CauchyConfig)arg1) -> float
- property num_consecutive_same_cycle_number¶
Number of consecutive Cauchy approximations that must report the same cycle number before a converged approximation is trusted.
- property ratio_cutoff_time¶
None( (bertini._pybertini.endgame.CauchyConfig)arg1) -> float
- set(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- to_dict()¶
The config’s fields as an ordinary dict of {name: value}.
- update(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- class bertini.endgame.EndgameConfig((object)arg1)¶
Bases:
instanceGeneric endgame settings. Number of sample points, etc. Note that some of its configs are rational numbers
- __init__((object)arg1) None¶
- property final_tolerance¶
a solution of order 1000 found to 1e-6 is known to about 1e-3. The distance reached is reported per solution as accuracy_estimate_internal_coords, and in your variables as accuracy_estimate_user_coords. Default value is 1e-11.
- Type:
The tolerance to which to track the path, using the endgame
- Type:
in effect, how many digits to get right. An endgame stops when two consecutive approximations of the root are this close to each other in the infinity norm, measured in the solver’s INTERNAL coordinates (homogenized, on the patch), where a point has size about one. In your own variables that is an absolute error of about this tolerance times the size of the solution
- classmethod from_dict(mapping)¶
Build a config from a dict (default-constructs, then update()).
- property max_num_refinements¶
the maximum number of Newton refinements to be taken during sample point sharpening. Increasing this can help speed convergence, at the risk of path jumping.
- property min_track_time¶
The minimum distance from the target time to track to. Decreasing this may help failing runs succeed, or maybe not, because you are, after all, tracking toward a singularity.
- property minimum_for_c_over_k_stabilization¶
How closely successive c/k estimates must agree for the path to count as being in the endgame operating zone, as a ratio of the smaller to the larger. Their settling is what says the cycle-number estimate has settled, and so that the Puiseux asymptotics the endgame is built on dominate.
- property num_needed_for_stabilization¶
How many consecutive c/k estimates must agree for the path to count as being in the endgame operating zone.
- property num_sample_points¶
The number of points to use for extrapolant calculation. In the Power Series Endgame, the is the number of geometrically spaces points on the path. For Cauchy, this is the number of points on each circle tracked around the target time value.
- property refine_when_increasing_precision¶
Whether to re-refine the samples the endgame is keeping when it moves to a higher working precision (default False). Off, the retained samples carry the accuracy they were computed at, which is the accuracy of the lower precision; on, they are refined again at the new one, which costs Newton steps per retained sample and buys a sharper sample window. Part of the run’s identity, so changing it is a different ask.
- property sample_factor¶
The factor by which to space the geometrically spaced ‘distance’ between sample points, or sample circles for Cauchy.
- property sample_point_refinement_factor¶
Extra amount of tolerance for refining before computing the final approximation, during endgame.
- set(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- to_dict()¶
The config’s fields as an ordinary dict of {name: value}.
- update(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- class bertini.endgame.FixedDoublePowerSeriesEndgame(tracker, boundary_time)[source]¶
Bases:
_EndgameBase
- class bertini.endgame.FixedMultipleCauchyEndgame(tracker, boundary_time)[source]¶
Bases:
_EndgameBase
- class bertini.endgame.FixedMultiplePowerSeriesEndgame(tracker, boundary_time)[source]¶
Bases:
_EndgameBase
- class bertini.endgame.PowerSeriesConfig((object)arg1)¶
Bases:
instanceSettings specific to the power series endgame for computing singular endpoints
- __init__((object)arg1) None¶
- property cycle_number_amplification¶
The maximum number allowable iterations during endgames, for points used to approximate the final solution.
- classmethod from_dict(mapping)¶
Build a config from a dict (default-constructs, then update()).
- property max_cycle_number¶
The maximum cycle number to consider, when calculating the cycle number which best fits the path being tracked.
- set(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- to_dict()¶
The config’s fields as an ordinary dict of {name: value}.
- update(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- class bertini.endgame.SecurityConfig((object)arg1)¶
Bases:
instanceSecurity settings for endgames. Control things like truncation because estimated root is near infinity
- __init__((object)arg1) None¶
- classmethod from_dict(mapping)¶
Build a config from a dict (default-constructs, then update()).
- property level¶
two consecutive endpoint approximations whose largest coordinate is above max_norm end the path with SuccessCode.SecurityMaxNormReached, in either endgame. 1 does not truncate, and tracks every path to its end.
- Type:
Whether the endgame truncates a path that appears to be going to infinity. 0 (the default) truncates
- property max_norm¶
If on, the norm at which to truncate a path.
- set(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.
- to_dict()¶
The config’s fields as an ordinary dict of {name: value}.
- update(**kwargs)¶
Set one or more fields at once; returns self so calls can chain.
Numeric fields accept strings (e.g. max_step_size=”0.05”), which are converted exactly to multiprecision values. Raises AttributeError on an unknown/misspelled field name.