aixd.mlmodel

This package contains the machine-learning model implementation.

Data Loading

DataModule

Data module for the ML model.

Architecture

Models

CondAEModel

Class representing a Conditional Autoencoder model.

CondVAEModel

Class representing a Conditional Variational Autoencoder model.

InverseModel

Wrapper class for taking a Cond(V)AEModel and fine-tuning the decoder using the encoder as surrogate model.

FreezeEncoder

A PyTorch Lightning callback class that extends the BaseFinetuning class and freezes the encoder of the CondAEModel before training.

Blocks

ResBlockFC

Module implementing a fully-connected residual block.

ResBlockConv

Module implementing a convolutional residual block.

ResBlock1D

Module implementing a 1D convolutional residual block.

ResBlock2D

Module implementing a 2D convolutional residual block.

ResBlock3D

Module implementing a 3D convolutional residual block.

SelfAttn

Module implementing a self-attention layer.

SelfAttn1D

Module implementing a 1D self-attention layer.

SelfAttn2D

Module implementing a 2D self-attention layer.

SelfAttn3D

Module implementing a 3D self-attention layer.

Activation

Module wrapping around an activation function.

Decoders/Encoders

Decoder

Decoder module of the conditional (variational) autoencoder.

Encoder

Encoder module of a conditional variational autoencoder.

VEncoder

Encoder module of a conditional variational autoencoder with additional parameters for the latent distribution.

Heads

InHeadFC

Fully-Connected Feed-Forward Network for encoding an unstrucured, 1D feature.

OutHeadFC

Fully-Connected Feed-Forward Network for decoding an unstrucured, 1D feature.

InHeadConv

Convolutional Network for encoding spatially strucured data in 1, 2 or 3 dimensions.

OutHeadConv

Convolutional Network for decoding spatially strucured data in 1, 2 or 3 dimensions.

InHeadConv1D

Convolutional Network for encoding spatially strucured (temporal) data in 1 dimension.

OutHeadConv1D

Convolutional Network for decoding spatially strucured (temporal) data in 1 dimension.

InHeadConv2D

Convolutional Network for encoding spatially strucured (image-like) data in 2 dimensions.

OutHeadConv2D

Convolutional Network for decoding spatially strucured (image-like) data in 2 dimensions.

InHeadConv3D

Convolutional Network for encoding spatially strucured (MRI- or video-like) data in 3 dimensions.

OutHeadConv3D

Convolutional Network for decoding spatially strucured (MRI- or video-like) data in 3 dimensions.

Losses

LossStd

Loss for the standard deviation of the values.

MGEloss

Mean gradient error.

Generation

Generator

Initialize a Generator instance.

GeneratorSampler

The Generator class needs to sampled from the outputML, in order to provide these values as entry to the decoder.

Sensitivity Analysis

LocalSensitivity

Sensitivity analysis class for the calculation and plotting of local sensitivities.

GlobalSensitivity

Sensitivity analysis class for the calculation and plotting of global sensitivities.