AIModels.ClimFormer module

ClimFormer class, a subclass of InformerForPrediction

This class is a subclass of Informer It contains classes for time series dataset, future time series dataset, and two subclasses of InformerForPrediction and TimeSeriesTransformerForPrediction

class AIModels.ClimFormer.TimeSeriesDataset(datasrc, datatgt, TIN, MIN, T, K, time_features=None)[source]

Bases: Dataset

Class for time series dataset. Includes time feature for transformers

Parameters:
  • datasrc (numpy array) -- Source data

  • datatgt (numpy array) -- Target data

  • TIN (int) -- Input time steps

  • MIN (int) -- Input variables size

  • T (int) -- Predictions time steps

  • K (int) -- Output variables size

  • time_features (numpy array (optional)) -- If not None contain Time Features

Variables:
  • datasrc (numpy array) -- Source data

  • datatgt (numpy array) -- Target data

  • time_features (numpy array) -- Time features

  • TIN (int) -- Input time steps

  • MIN (int) -- Input variables

  • T (int) -- Output time steps

  • K (int) -- Output variables

class AIModels.ClimFormer.TimeSeriesFuture(datasrc, datatgt, TIN, MIN, T, K, Tpredict, time_features=None)[source]

Bases: Dataset

Class for time series dataset. Includes future time feature for prediction with informer

Parameters:
  • datasrc (numpy array) -- Source data

  • datatgt (numpy array) -- Target data

  • TIN (int) -- Input time steps

  • MIN (int) -- Input variables size

  • T (int) -- Predictions time steps

  • K (int) -- Output variables size

  • time_features (numpy array (optional)) -- If not None contain Time Features

  • shift --

    Overlap between source and target, for trasnformers

    overlap = 0 for LSTM overlap should be TIN-T

Variables:
  • datasrc (numpy array) -- Source data

  • datatgt (numpy array) -- Target data

  • time_features (numpy array) -- Time features

  • TIN (int) -- Input time steps

  • MIN (int) -- Input variables

  • T (int) -- Output time steps

  • K (int) -- Output variables

class AIModels.ClimFormer.ClimFormer(config)[source]

Bases: InformerForPrediction

Class for training and prediction with InformerForPrediction model from transformers library

class AIModels.ClimFormer.TrasFormer(*args)[source]

Bases: TimeSeriesTransformerForPrediction

Class for training and prediction with TimeSeriesTransformerForPrediction model from transformers library