plot_estimates#

er_evaluation.plots.plot_estimates(predictions, sample_weights, estimators={'Pairwise precision': <function pairwise_precision_estimator>, 'Pairwise recall': <function pairwise_recall_estimator>}, type='line', line_shape='spline', **kwargs)[source]#

Plot representative performance estimates.

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

  • sample_weights (dict) – Dictionary with an element named “sample” containing sampled clusters, and an element named “weights” containing the sampling weights.

  • estimators (dict, optional) – Dictionary of estimators to use. Defaults to DEFAULT_ESTIMATORS.

  • 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_estimates(predictions, {"sample": reference, "weights": "cluster_size"})
>>> fig.show()