SpecificationError#
- exception cultivars.exceptions.SpecificationError[source]#
Bases:
CultivarsError,ValueErrorA model, polynomial, or coefficient set is invalid or inconsistent.
The shapes are fine but the choice is not: an unknown categorical option, an order below its minimum, a sample too short for the requested depth, a result handed to a consumer that does not expose the surface it reads, a transition matrix whose rows do not sum to one. The most common exception in the package, and the one a misspelled keyword lands on. Also a
ValueError. The closed lists a message quotes are theLiteralaliases intyping, and the check that fires is usuallyvalidate_choice,validate_orderorvalidate_transitionin_core.See also
DimensionError– when the choice is fine and the shape is not.typing– the permitted values quoted in the messages.
Example
>>> import numpy as np >>> from cultivars.univariate.box_jenkins import ARIMA >>> ARIMA(np.arange(50.0), order=(1, 0, 0), trend="quadratic") Traceback (most recent call last): ... cultivars.exceptions.SpecificationError: trend must be one of ('n', 'c', 'ct'); got ... >>> ARIMA(np.arange(50.0), order=(-1, 0, 0)) Traceback (most recent call last): ... cultivars.exceptions.SpecificationError: ...