cca_zoo.visualisation.ScoreScatterDisplay#

class cca_zoo.visualisation.ScoreScatterDisplay(scores, test_scores=None, labels=None, test_labels=None, show_corr=True, ax_labels=None, **kwargs)[source]#

Bases: object

Display the scores of a model.

Parameters:
  • scores (tuple) – Tuple of two arrays representing training scores for two representations.

  • test_scores (tuple, optional) – Tuple of two arrays representing test scores for two representations. Default is None.

  • labels (array-like, optional) – Labels for training data. Default is None.

  • test_labels (array-like, optional) – Labels for test data. Default is None.

  • separate (bool, optional) – Whether to plot train and test scores separately. Default is False.

  • show_corr (bool, optional) – Whether to show correlation plots. Default is True.

  • **kwargs – Additional keyword arguments passed to seaborn’s scatterplot.

figure_#

The generated figure.

Type:

matplotlib.figure.Figure

classmethod from_estimator(model, train_views, test_views=None, labels=None, test_labels=None, ax_labels=None, show_corr=True, **kwargs)[source]#

Create a ScoreDisplay instance from an estimator and data representations.

Parameters:
  • model – The estimator model.

  • train_views (tuple) – Tuple of two arrays representing training data representations.

  • test_views (tuple, optional) – Tuple of two arrays representing test data representations. Default is None.

  • **kwargs – Additional keyword arguments passed to the ScoreDisplay constructor.

Returns:

An instance of ScoreDisplay.

Return type:

ScoreScatterDisplay

classmethod from_scores(train_scores, test_scores=None, labels=None, test_labels=None, ax_labels=None, show_corr=True, **kwargs)[source]#

Create a ScoreDisplay instance from precomputed scores.

Parameters:
  • train_scores (tuple) – Tuple of two arrays representing training scores for two representations.

  • test_scores (tuple, optional) – Tuple of two arrays representing test scores for two representations. Default is None.

  • **kwargs – Additional keyword arguments passed to the ScoreDisplay constructor.

Returns:

An instance of ScoreDisplay.

Return type:

ScoreScatterDisplay