DelayedFeatureTransformer.__init__(date_index=None, max_delay=2, delay_features=True, delay_target=True, gap=1, random_seed=0, **kwargs)[source]

Creates a DelayedFeatureTransformer.

  • date_index (str) – Name of the column containing the datetime information used to order the data. Ignored.

  • max_delay (int) – Maximum number of time units to delay each feature.

  • delay_features (bool) – Whether to delay the input features.

  • delay_target (bool) – Whether to delay the target.

  • gap (int) – The number of time units between when the features are collected and when the target is collected. For example, if you are predicting the next time step’s target, gap=1. This is only needed because when gap=0, we need to be sure to start the lagging of the target variable at 1.

  • random_seed (int) – Seed for the random number generator. This transformer performs the same regardless of the random seed provided.