ise.models.predictors package
Submodules
ise.models.predictors.deep_ensemble module
- class ise.models.predictors.deep_ensemble.DeepEnsemble(ensemble_members=None, input_size=83, output_size=1, num_ensemble_members=3, output_sequence_length=86, latent_dim=1)[source]
Bases:
Module- fit(X, y, X_val=None, y_val=None, save_checkpoints=True, checkpoint_path='checkpoint_ensemble', early_stopping=False, epochs=100, batch_size=128, sequence_length=5, patience=10, verbose=True)[source]
Trains the ensemble with optional early stopping.
Args: - X, y: Training data. - early_stopping (bool): Use early stopping. Defaults to False.
- forward(x)[source]
Performs a forward pass through the ensemble.
Args: - x: Input data.
Returns: - mean_prediction: Mean prediction across ensemble members. - epistemic_uncertainty: Standard deviation across ensemble predictions.
ise.models.predictors.lstm module
- class ise.models.predictors.lstm.LSTM(lstm_num_layers, lstm_hidden_size, input_size=83, output_size=1, criterion=MSELoss(), output_sequence_length=86, optimizer=<class 'torch.optim.adam.Adam'>)[source]
Bases:
Module- fit(X, y, epochs=100, sequence_length=5, batch_size=64, criterion=None, X_val=None, y_val=None, save_checkpoints=True, checkpoint_path='checkpoint.pt', early_stopping=False, patience=10, verbose=True, dataclass=<class 'ise.data.dataclasses.EmulatorDataset'>)[source]
- forward(x)[source]
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.