mofaflex.priors.SpikeSlab#

class mofaflex.priors.SpikeSlab(background_is_gaussian=False, init_prob=0.5, psi_prior_param=0.001, theta_prior_param_alpha=1.0, theta_prior_param_beta=1.0)#

Spike and slab sparsity-inducing prior.

Parameters:
  • background_is_gaussian (bool (default: False)) – Whether the background distribution should be a Gaussian centered at 0. In that case the prior is a mixture of Normal distributions.

  • init_prob (float (default: 0.5)) – The initialization value for the foreground probability \(\theta\). Set to 0.2 to be consistent with GSFA [ZLL+23].

  • psi_prior_param (float (default: 0.001)) – The value for shape and rate of the Gamma distribution for \(\psi\). Set to 1. to be consistent with GSFA [ZLL+23].

  • theta_prior_param_alpha (float (default: 1.0)) – The value for the \(\alpha\) parameter of the Beta distribution used to sample the foreground probabilities \(\theta\). Set to 10. to be consistent with GSFA [ZLL+23].

  • theta_prior_param_beta (float (default: 1.0)) – The value for the \(\beta\) parameter of the Beta distribution used to sample the foreground probabilities \(\theta\). Set to 40. to be consistent with GSFA [ZLL+23].

Important

All methods and properties of this class are only accessible through the MofaFlex class.

Methods table#

get_sparse_factor_probabilities([ordered])

The posterior probabilities \(\theta\) that the value is sampled from the foreground distribution.

get_sparse_weight_probabilities([ordered])

The posterior probabilities \(\theta\) that the value is sampled from the foreground distribution.

Methods#

SpikeSlab.get_sparse_factor_probabilities(ordered=False)#

The posterior probabilities \(\theta\) that the value is sampled from the foreground distribution.

Parameters:

ordered (bool (default: False)) – Whether to return the factors ordered by explained variance (highest to lowest).

Return type:

Mapping[str, DataFrame]

SpikeSlab.get_sparse_weight_probabilities(ordered=False)#

The posterior probabilities \(\theta\) that the value is sampled from the foreground distribution.

Parameters:

ordered (bool (default: False)) – Whether to return the factors ordered by explained variance (highest to lowest).

Return type:

Mapping[str, DataFrame]