Latent Binary Bayesian Neural Networks Using 'torch'
Generate prior inclusion probabilities for the weights of a LBBNN laye...
Assign names to nodes.
Function for plotting nodes in the network between two layers.
Get model coefficients (local explanations) of an LBBNN_Net object
Generate a custom activation function.
Generate initializations for the inclusion parameters.
Class to generate a normalizing flow
Obtain adjacency matrices for igraph plotting
Wrapper around torch::dataloader
Function that checks how many times inputs are included, and from whic...
Function to get gradient based local explanations for input-skip LBBNN...
Class to generate an LBBNN convolutional layer.
Class to generate an LBBNN feed forward layer
Feed-forward Latent Binary Bayesian Neural Network (LBBNN)
Function to plot an input skip structure after removing weights in non...
LBBNN: Latent Binary Bayesian Neural Networks Using 'torch'
Multi layer-perceptron
Plot the gradient based local explanations for one sample with input-s...
Plot LBBNN_Net objects
Obtain predictions from the variational posterior of an LBBNN model
Print summary of an LBBNN_Net object
Function to obtain empirical 95% confidence interval, including the me...
Residuals from LBBNN fit
Single RNVP transform layer.
Generate prior standard deviation for weights and biases of either lin...
Summary of LBBNN fit
Train an instance of LBBNN_Net.
Validate a trained LBBNN model.
Latent binary Bayesian neural networks (LBBNNs) are implemented using 'torch', an R interface to the LibTorch backend. Supports mean-field variational inference as well as flexible variational posteriors using normalizing flows. The standard LBBNN implementation follows Hubin and Storvik (2024) <doi:10.3390/math12060788>, using the local reparametrization trick as in Skaaret-Lund et al. (2024) <https://openreview.net/pdf?id=d6kqUKzG3V>. Input-skip connections are also supported, as described in Høyheim et al. (2025) <doi:10.48550/arXiv.2503.10496>.