Skip to contents

Plots the logarithm of the Evidence Lower Bound (ELBO) and the mean change in ELBO (delta ELBO) obtained during variational inference. This helps to assess the convergence and quality of the variational fit.

Usage

plot_elbo(x, elbo_data, diagnose = TRUE)

Arguments

x

A bipod object of class bipod that contains the fitted model and ELBO data.

elbo_data

A data frame or tibble containing ELBO values over iterations. Must include columns iter, ELBO, and delta_ELBO_mean.

diagnose

A logical value indicating whether to color the plot based on the convergence of the ELBO. If TRUE, the plot will include color coding based on whether the ELBO converged.

Value

A ggplot2 object displaying the ELBO and delta ELBO mean traces.