:py:mod:`ForeTiS.model._additionalmodels.lstmbayes_intel` ========================================================= .. py:module:: ForeTiS.model._additionalmodels.lstmbayes_intel Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ForeTiS.model._additionalmodels.lstmbayes_intel.LSTM .. py:class:: LSTM(optuna_trial, datasets, featureset_name, optimize_featureset, pca_transform = None, current_model_name = None, batch_size = None, n_epochs = None, target_column = None) Bases: :py:obj:`ForeTiS.model._torch_model.TorchModel` Implementation of a class for a bayesian Long Short-Term Memory (LSTM) network. See :obj:`~ForeTiS.model._base_model.BaseModel` and :obj:`~ForeTiS.model._torch_model.TorchModel` for more information on the attributes. .. py:method:: define_model() Definition of a bayesian LSTM network. Architecture: - Bayesian LSTM, Dropout, Linear - Bayesian Linear output layer Number of output channels of the first layer, dropout rate, frequency of a doubling of the output channels and number of units in the first linear layer. may be fixed or optimized. .. py:method:: define_hyperparams_to_tune() See :obj:`~ForeTiS.model._base_model.BaseModel` for more information on the format. See :obj:`~ForeTiS.model._torch_model.TorchModel` for more information on hyperparameters common for all torch models. .. py:method:: train_val_loader(train, val) Get the Dataloader with training and validation data :poram train: training data :param val: validation data :return: train_loader, val_loader, val .. py:method:: predict(X_in) Implementation of a prediction based on input features for the bayes lstm model. See :obj:`~ForeTiS.model._base_model.BaseModel` for more information .. py:method:: get_dataloader(X, y = None, only_transform = None, predict = False, shuffle = False) Get a Pytorch DataLoader using the specified data and batch size :param X: feature matrix to use :param y: optional target vector to use :param only_transform: whether to only transform or not :param predict: weather to use the data for predictions or not :param shuffle: shuffle parameter for DataLoader :return: Pytorch DataLoader .. py:method:: create_sequences(X, y) Create sequenced data according to self.seq_length :return: sequenced data and labels