cca_zoo.visualisation.WeightInferenceDisplay#

class cca_zoo.visualisation.WeightInferenceDisplay(idata, num_views=2, true_features=None)[source]#

Bases: object

Class for displaying inference-related plots.

idata#

The posterior samples.

Type:

arviz.InferenceData

true_features#

The true features for comparison in the plot, defaults to None.

Type:

array-like, optional

num_views#

The number of representations, defaults to 2.

Type:

int, optional

classmethod from_estimator(pcca_estimator, true_features=None)[source]#

Class method to create an InferenceDisplay instance from an estimator.

Parameters:
  • pcca_estimator (object) – The estimator object with an ‘mcmc’ attribute.

  • true_features (array-like, optional) – The true features for comparison in the plot, defaults to None.

Returns:

An InferenceDisplay instance.

Return type:

WeightInferenceDisplay

classmethod from_mcmc(mcmc, true_features=None)[source]#

Class method to create an InferenceDisplay instance from mcmc samples.

Parameters:
  • mcmc (object) – The mcmc samples.

  • true_features (array-like, optional) – The true features for comparison in the plot, defaults to None.

Returns:

An InferenceDisplay instance.

Return type:

WeightInferenceDisplay

plot()[source]#

Plot the posterior distributions of parameters and latent variables. Adds true values if they are provided.