skneuromsi.ndcollection.cplot_acc module
Utilities for plotting NDResultCollection data.
NDResultCollectionPlotter provides methods for plotting NDResultCollection data, including line plots for reports and biases.
- class skneuromsi.ndcollection.cplot_acc.NDResultCollectionPlotter(ndcollection)[source]
Bases:
AccessorABCNDResultCollection plotting utilities.
- Parameters:
ndcollection (NDResultCollection) – The NDResultCollection object to be plotted.
- n_report(n, *, parameter=None, ax=None, **kws)[source]
Line plot of the N-report for a given number of causes.
- Parameters:
n (int) – The number of causes for the N-report.
parameter (str, optional) – The parameter to plot, by default None.
ax (matplotlib.axes.Axes, optional) – The axes object to plot on, by default None.
**kws – Additional keyword arguments for the plot.
- Returns:
ax – The plotted axes object.
- Return type:
matplotlib.axes.Axes
- unity_report(*, parameter=None, ax=None, **kws)[source]
Line plot of the unity report.
- Parameters:
parameter (str, optional) – The parameter to plot, by default None.
ax (matplotlib.axes.Axes, optional) – The axes object to plot on, by default None.
**kws – Additional keyword arguments for the plot.
- Returns:
ax – The plotted axes object.
- Return type:
matplotlib.axes.Axes
- mean_report(*, parameter=None, ax=None, **kws)[source]
Line plot of the mean report.
- Parameters:
parameter (str, optional) – The parameter to plot, by default None.
ax (matplotlib.axes.Axes, optional) – The axes object to plot on, by default None.
**kws – Additional keyword arguments for the plot.
- Returns:
ax – The plotted axes object.
- Return type:
matplotlib.axes.Axes
- bias(influence_parameter, *, changing_parameter=None, dim=None, mode=None, quiet=False, show_iterations=True, show_mean=True, ax=None, legend=True, it_linestyle='--', it_alpha=0.25, mean_color='black', **kws)[source]
Line plot of bias.
- Parameters:
influence_parameter (object) – The parameter that influences the bias calculation.
changing_parameter (object, optional) – The parameter that changes across the bias calculation.
dim (object, optional) – The dimension to use for the bias calculation.
mode (object, optional) – The mode to use for the bias calculation.
quiet (bool, default False) – If True, suppress output messages.
show_iterations (bool, default True) – If True, plot individual iterations of bias data.
show_mean (bool, default True) – If True, plot the mean bias data.
ax (matplotlib.axes.Axes, optional) – The matplotlib axes to plot on. If None, a new figure and axes will be created.
legend (bool, default True) – If True, add a legend to the plot.
it_linestyle (str, default '--') – The line style to use for iteration plots.
it_alpha (float, default 0.25) – The alpha (transparency) value for iteration plots.
mean_color (str, default 'black') – The color to use for the mean bias plot.
**kws (dict) – Additional keyword arguments to pass to seaborn’s lineplot.
- Returns:
The matplotlib axes containing the plot.
- Return type:
matplotlib.axes.Axes
- Raises:
ValueError – If both show_iterations and show_mean are False.