LegRecord#

class scikitplot.mcp.LegRecord(leg, status, hit_count=0, error=None)[source]#

How one retrieval leg fared.

Parameters:
legstr

Identifier for the evidence path, e.g. "dense" or "lexical".

statusstr

One of SUCCESS, EMPTY, DEGRADED, FAILED or CANCELLED.

hit_countint, optional

Hits contributed by this leg before fusion.

errorstr or None, optional

Human-readable reason. Required when status is DEGRADED or FAILED.

Raises:
ValueError

If status is not a known status, or if a degraded/failed leg is recorded without an error.

Parameters:

Notes

Developer-focused. The error-required invariant is enforced here rather than merely documented, matching scikitplot.corpus.LegOutcome: an unexplained degradation is as unhelpful as no degradation signal at all.

as_dict()[source]#

Return a JSON-safe mapping describing this leg.

Returns:
dict

Keys leg, status, hit_count and — only when set — error.

Return type:

dict[str, Any]

error#

!! processed by numpydoc !!

hit_count#

!! processed by numpydoc !!

leg#

!! processed by numpydoc !!

status#

!! processed by numpydoc !!