API Reference¶
-
class
sigmet.sigmet.
Sigmet
(data)¶ -
fit
(window_start, window_end, sarimax_params=(5, 1, 1), standardize=False, moving_average=1, force_start=False, recovery_threshold=0.9)¶ Fits the model and returns a score representing the magnitude of the largest negative shock in the window.
Parameters: - window_start (pd.datetime object) – Date after which to begin searching for a negative shock, exclusive.
- window_end (pd.datetime object) – Date before which to search for a a negative shock, inclusive.
- sarimax_params (tuple (length 3), default=(5, 1, 1)) – (p, q, d) values for tuning SARIMAX model
- standardize (boolean object, default=False) – If False, then no change to the fitted Series. If True, then the fitted Series will be standardized before being passed into .fit()
- moving_average (int, default=1) – Length of moving average window to apply to data. Default of 1 means no MA applied.
- force_start (boolean, default=False) – Allows user to ‘fix’ define start_date of shock instead of searching for it
- recovery_threshold (float, default=0.9) – Percentage of starting value (expressed as proportion from 0 to 1) that is considered a “full” recovery
Returns: Returns area score computed from given parameters.
Return type: int
-
graph
(window_start=None, window_end=None, sarimax_params=(5, 1, 1), standardize=False, **kwargs)¶ Graphs series along with forecasted trendline starting at recession and ending at end of series.
Parameters: - window_start (pd.datetime object) – Date after which to begin searching for a negative shock.
- window_end (pd.datetime object) – Date before which to search for a a negative shock.
- sarimax_params (tuple (length 3), default=(5, 1, 1)) – (p, q, d) values for tuning SARIMAX model
- standardize (boolean object, default=False) – If False, then no change to the fitted Series. If True, then the fitted Series will be standardized before being passed into .fit() .
- **kwargs (keyword arguments) – args to be passed into the seaborn plot.
Returns: Return type: Matplotlib.pyplot plot with seaborn styling
-