Model comparison visualizations.
Functions
plot_ranking_table(scores: Union[np.ndarray, Dict[str, np.ndarray]], names: List[str]=None, dataset_names: List[str]=None, lower_better: bool=False, metric_name: str='Score', figsize: Tuple[int, int]=None, save_path: str=None, show_ranks: bool=True, precision: int=3, title: str=None)
Plot a ranking table with scores and ranks.
Parameters
scores
ndarray of shape (n_datasets, n_algorithms) or dict
Performance scores matrix.
names
list of str
Algorithm names.
dataset_names
list of str
Dataset names.
lower_better
bool
= False
If True, lower scores are better.
metric_name
str
= 'Score'
Name of the metric.
figsize
tuple
Figure size.
save_path
str
Path to save the figure.
show_ranks
bool
= True
Whether to show ranks in parentheses.
precision
int
= 3
Decimal precision for scores.
title
str
Custom title. Set to empty string '' to hide title.
plot_boxplot_comparison(scores: Union[np.ndarray, Dict[str, np.ndarray]], names: List[str]=None, metric_name: str='Score', figsize: Tuple[int, int]=(), save_path: str=None, show_mean: bool=True, notch: bool=False, show_grid: bool=False)
Plot boxplot comparison of algorithms.
Parameters
scores
ndarray of shape (n_datasets, n_algorithms) or dict
Performance scores matrix.
names
list of str
Algorithm names.
metric_name
str
= 'Score'
Name of the metric.
figsize
tuple, 6)
= (12
Figure size.
save_path
str
Path to save the figure.
show_mean
bool
= True
Show mean as a marker.
notch
bool
= False
Show notched boxplot (confidence interval).
show_grid
bool
= False
Whether to show axis grid lines.
plot_heatmap(scores: Union[np.ndarray, Dict[str, np.ndarray]], names: List[str]=None, dataset_names: List[str]=None, metric_name: str='Score', figsize: Tuple[int, int]=None, save_path: str=None, cmap: str='YlGnBu', annotate: bool=True, precision: int=3, show_grid: bool=False)
Plot heatmap of scores.
Parameters
scores
ndarray of shape (n_datasets, n_algorithms) or dict
Performance scores matrix.
names
list of str
Algorithm names.
dataset_names
list of str
Dataset names.
metric_name
str
= 'Score'
Name of the metric.
figsize
tuple
Figure size.
save_path
str
Path to save the figure.
cmap
str
= 'YlGnBu'
Colormap name.
annotate
bool
= True
Show values in cells.
precision
int
= 3
Decimal precision for annotations.
show_grid
bool
= False
Whether to show axis grid lines.