LION.evaluation.figures¶
Figures of test records: score plots and example images, in plain matplotlib (your style sheet and rcParams apply).
per_sample(records, metric): each method’s per-sample scores, andper_sample_differences(records, metric, baseline): each method’s minus the baseline’s, sample by sample: the data, for any plot;box_plotanddifference_plot: those as box plots (ax.boxplot);chosen_samples(record): the samples where a method (the baseline) does best, median and worst;reconstructions(evaluation, methods, ids)andexample_images(...): the targets and each method’s images of some samples, in one grey window, with zoomed crops and differences to the target if asked.
Plots take ax= (draw into your figure) and return the Figure. matplotlib
is imported only here, so LION.evaluation imports without it.
Functions
|
Each method's per-sample |
|
|
|
Each method's per-sample |
|
The targets and each method's images, one row per sample (the target first, then the methods), in one grey window: |
|
|
|
|
|
The targets and each method's images of the samples |
- LION.evaluation.figures.box_plot(records, metric, ax=None)[source]¶
Each method’s per-sample
metric(per_sample), one box each.
- LION.evaluation.figures.chosen_samples(record, metric=None)[source]¶
{"best": id, "median": id, "worst": id}: the samples whererecord’s method scores best, median and worst onmetric(default: the first).
- LION.evaluation.figures.difference_plot(records, metric, baseline, ax=None)[source]¶
Each method’s per-sample
metricminus the baseline’s (per_sample_differences), one box each, with a line at 0.
- LION.evaluation.figures.example_images(targets, outputs, data_range=None, zoom=None, differences=False, labels=None, scores=None, zoom_color='C1')[source]¶
The targets and each method’s images, one row per sample (the target first, then the methods), in one grey window:
data_range((min, max); None: each target’s own).zoom:[(row, col, height, width), ...]in pixels: each region is outlined and shown enlarged in a row below.differences: a row of each method’s image minus the target.labels:{id: row label}.scores:{name: {id: text}}written under the images.zoom_color: of the outlines (default: the second colour of your colour cycle).
- LION.evaluation.figures.per_sample(records, metric)[source]¶
{name: [score of each sample]}of each record, in order.