ExogShiftTransform

class ExogShiftTransform(lag: Union[int, Literal['auto']], horizon: Optional[int] = None)[source]

Bases: etna.transforms.base.IrreversibleTransform, etna.transforms.base.FutureMixin

Shifts exogenous variables from a given dataframe.

Create instance of ExogShiftTransform.

Parameters
  • lag (Union[int, Literal['auto']]) –

    value for shift estimation

    • if set to int all exogenous variables will be shifted lag steps forward;

    • if set to auto minimal shift will be estimated for each variable based on the prediction horizon and available timeline

  • horizon (Optional[int]) – prediction horizon. Mandatory when set to lag=”auto”, ignored otherwise

Inherited-members

Methods

fit(ts)

Fit the transform.

fit_transform(ts)

Fit and transform TSDataset.

get_regressors_info()

Return the list with regressors created by the transform.

inverse_transform(ts)

Inverse transform TSDataset.

load(path)

Load an object.

params_to_tune()

Get grid for tuning hyperparameters.

save(path)

Save the object.

set_params(**params)

Return new object instance with modified parameters.

to_dict()

Collect all information about etna object in dict.

transform(ts)

Transform TSDataset inplace.

fit(ts: etna.datasets.tsdataset.TSDataset) etna.transforms.math.lags.ExogShiftTransform[source]

Fit the transform.

Parameters

ts (etna.datasets.tsdataset.TSDataset) – Dataset to fit the transform on.

Returns

The fitted transform instance.

Return type

etna.transforms.math.lags.ExogShiftTransform

get_regressors_info() List[str][source]

Return the list with regressors created by the transform.

Return type

List[str]