kats.models.quadratic_model module¶

class kats.models.quadratic_model.QuadraticModel(data: kats.consts.TimeSeriesData, params: kats.models.quadratic_model.QuadraticModelParams)[source]¶

Bases: Generic[kats.models.model.ParamsType]

Model class for Quadratic Model.

This class provides the fit, predict and plot methods for the Quadratic Model

data¶

the input time series data as kats.consts.TimeSeriesData

params¶

the parameter class defined with QuadraticModelParams

fit()None[source]¶

fit Quadratic Model.

static get_parameter_search_space()List[Dict[str, object]][source]¶

get default parameter search space for Quadratic model.

plot()[source]¶

Plot Forecasted results from the Quadratic Model.

predict(steps: int, include_history=False, **kwargs)pandas.core.frame.DataFrame[source]¶

predict with fitted quadratic model.

Parameters
  • steps – the steps or length of the prediction horizon

  • include_history – whether to include the historical data in the prediction

Returns

time, fcst, fcst_lower, and fcst_upper

Return type

The predicted dataframe with the following columns

class kats.models.quadratic_model.QuadraticModelParams(alpha=0.05, **kwargs)[source]¶

Bases: kats.consts.Params

Parameter class for Quadratic model.

This is the parameter class for the quadratic model. .. attribute:: alpha

The alpha level for the confidence interval. The default alpha = 0.05 returns a 95% confidence interval

validate_params()[source]¶

Validate Quadratic Model Parameters

Since the quadratic model does not require key parameters to be defined this is not required for this class