mofaflex.pl.factor_sparsity_histogram

mofaflex.pl.factor_sparsity_histogram#

mofaflex.pl.factor_sparsity_histogram(model, bins=50, nrow=None, ncol=None)#

Plot a histogram of probabilities that factors are non-zero for views with SnS prior.

The spike-and-slab prior is a mixture distribution of a Normal distribution with a potentially non-zero mean and a Dirac delta distribution at zero. This function plots the posterior probability of the Normal mixture compoonent.

Parameters:
  • model – The term to plot the histogram for. Can also be a MOFAFLEX object if it has only one term.

  • bins (default: 50) – Number of histogram bins.

  • nrow (default: None) – Number of rows in the faceted plot. If None, plotnine will determine automatically.

  • ncol (default: None) – Number of columns in the faceted plot. If None, plotnine will determine automatically.