src.variants.metamodels.neural_networks module
This module is responsible for training and inference of neural networks.
It includes the two functions train_mlp_model and infer_mlp_model for training and inference of multi layer perceptrons. In addition, it offers a custom loss function to learn an upper bound. See details in their own documentations.
It is a new implementation of the research we have done in student thesis [1].
Thesis: [1] J. Wang, „Maschinelles Lernen zur Metamodellierung von Fehlern in der Simulation automatisierter Fahrzeuge,“ Master’s Thesis, Technical University of Munich, Munich, Germany, 2020.
Contact person: Stefan Riedmaier Creation date: 04.06.2020 Python version: 3.8
- src.variants.metamodels.neural_networks.infer_mlp_model(x, model)
This function predicts outputs of a multi-layer perceptron model for inputs x.
- Parameters:
x (np.ndarray) – test data set inputs
model – multi-layer perceptron
- Returns:
predicted outputs on the test data set
- Return type:
np.ndarray
- src.variants.metamodels.neural_networks.train_mlp_model(x, y)
This function trains a multi-layer perceptron (MLP).
- Parameters:
x (np.ndarray) – training input data
y (np.ndarray) – training output data
- Returns:
trained multi-layer perceptron
- src.variants.metamodels.neural_networks.upper_bound_loss(y_true, y_pred)
This function defines a loss calculation to learn an upper bound on data.
- Parameters:
y_true (np.ndarray) – ground truth outputs
y_pred (np.ndarray) – predicted outputs
- Returns:
loss value
- Return type:
float