plot_metrics#

er_evaluation.plot_metrics(predictions, reference, metrics={'Pairwise precision': <function pairwise_precision>, 'Pairwise recall': <function pairwise_recall>}, type='line', **kwargs)[source]#

Plot performance metrics.

Parameters:
  • predictions (dict) – Dictionary of predictions for which to plot the performance metrics.

  • reference (Series) – Reference membership vector representing the ground truth.

  • metrics (dict, optional) – Dictionary of metrics to display. Defaults to DEFAULT_METRICS.

  • type (str, optional) – One of “line” for a line plot or “bar” for a bar plot. Defaults to “line”.

  • **kwargs (optional) – Additional arguments to pass to plotly express for plot creation.

Returns:

plotly Figure

Examples

>>> from er_evaluation.datasets import load_pv_disambiguations
>>> predictions, reference = load_pv_disambiguations()
>>> fig = plot_metrics(predictions, reference)
>>> fig.show()