amatorch.plot.statistics
Functions
|
Plot an ellipse with a given center and covariance matrix. |
|
Plot the ellipses of the filter response statistics across classes. |
- amatorch.plot.statistics.single_ellipse(center, covariance, ax, color='black')
Plot an ellipse with a given center and covariance matrix.
- Parameters:
center (torch.Tensor) – Center of the ellipse. Shape (2).
covariance (torch.Tensor) – Covariance matrix of the ellipse. Shape (2, 2).
ax (matplotlib.axes.Axes) – Axes to plot the ellipse.
color (str, optional) – Color of the ellipse. The default is ‘black’.
- amatorch.plot.statistics.statistics_ellipses(means, covariances, filter_pair=(0, 1), ax=None, values=None, classes_plot=None, color_map='viridis', legend_type='none', **kwargs)
Plot the ellipses of the filter response statistics across classes.
- Parameters:
means (torch.Tensor) – Means of the filter responses. Shape (n_classes, n_filters).
covariances (torch.Tensor) – Covariances of the filter responses. Shape (n_classes, n_filters, n_filters).
filter_pair (tuple of int, optional) – Pair of filters to plot. The default is [0, 1].
ax (matplotlib.axes.Axes, optional) – Axes to plot the ellipses. If None, a new figure is created. The default is None.
values (torch.Tensor, optional) – Values to color code the ellipses. Each value corresponds to a class. The default is linearly spaced values between -1 and 1.
classes_plot (list, optional) – List of classes to plot. The default is all classes.
color_map (str or matplotlib.colors.Colormap, optional) – Color map to use for the ellipses. The default is ‘viridis’.
legend_type (str, optional) – Type of legend to add: ‘none’, ‘continuous’, ‘discrete’.
- Returns:
ax – Axes with the scatter plot.
- Return type:
matplotlib.axes.Axes