Implement Bayesian Neural Network (BNN) using Pytorch to predict mean and both aleatoric and epistemic uncertainties for the quantity of interest (QoI). In Bayesian setting, there are two main types of uncertainty; aleatoric uncertainty, which captures the noise inherent in the observations and epistemic uncertainty that accounts for the uncertainty in the model. By collecting more data we can reduce the epistemic uncertainty. However, aleatoric uncertainty cannot be reduced even if more data were to be collected.
- Import the data
- Build the MC dropout BNN using Pytorch
- Use K-fold (shuffle the data as well)
- Train the model with the training data and test using the test data
- Predict unobserved data and plot
Loop over different dropout probabilities and different number of units to find the optimal values.
Plots RMSE and log likelihood of test data with respect to number of neurons and dropout probability rate.
Plots file "Part25_Predictions", which shows the average bond length predictions of 3 sets of part 25.
Plots:
Predicted bond length (mm) vs Observed bond length (mm) Temperature vs Bond length (mm)
using the test data.