DeepAbstractNet

class DeepAbstractNet[source]

Bases: abc.ABC

Interface for etna native deep models.

Inherited-members

Methods

make_samples(df, encoder_length, decoder_length)

Make samples from input slice of TSDataset.

step(batch, *args, **kwargs)

Make batch step.

abstract make_samples(df: pandas.core.frame.DataFrame, encoder_length: int, decoder_length: int) Iterable[dict][source]

Make samples from input slice of TSDataset.

Parameters
  • df (pandas.core.frame.DataFrame) – slice is per-segment Dataframes

  • encoder_length (int) – encoder_length

  • decoder_length (int) – decoder_length

Returns

samples of input slices

Return type

Iterable[dict]

abstract step(batch: dict, *args, **kwargs) Tuple[torch.Tensor, torch.Tensor, torch.Tensor][source]

Make batch step.

Parameters

batch (dict) – Batch with data to make inference on.

Returns

loss, true_target, prediction_target

Return type

Tuple[torch.Tensor, torch.Tensor, torch.Tensor]