superstats.transition.deterministic.polynomial#
Polynomial deterministic transition.
Classes
|
Deterministic polynomial transition with an intercept and beta weights. |
- class superstats.transition.deterministic.polynomial.Polynomial(bounds=None, intercept=None, betas=None, degree=2, normalize_steps=True)[source]#
Bases:
DeterministicTransitionDeterministic polynomial transition with an intercept and beta weights.
- Parameters:
- boundssequence
oftwofloatsorNone,optional, default:None Lower and upper bounds for the deterministic trajectory. Tuples and lists are accepted.
- intercept
float,Prior,orNone,optional, default:None Constant term of the polynomial. A Prior samples one intercept per trajectory; None uses the deterministic default prior.
- betas
float,Prior, sequenceoffloat/Prior/None,orNone Polynomial coefficients for the non-constant terms. If a single scalar or Prior is provided, the same specification is used for every beta. If a sequence is provided, it must have length degree and each element is used for the corresponding beta weight.
- degree
int,optional, default: 2 Number of polynomial terms beyond the intercept. For example, degree=1 reproduces a linear model, while the default degree=2 gives a quadratic model.
- normalize_stepsbool,
optional, default:True If True, use a time axis from 0 to 1. If False, use integer step indices, so higher-order terms are evaluated on raw step numbers.
- boundssequence
- Parameters:
Notes
The sample method returns a dict with keys deterministic_params, hyper_params, and fixed_params. Trajectory values are clipped to bounds.