LegOutcome#

class scikitplot.corpus.LegOutcome(leg, status, hit_count=0, generation=None, backend=None, error=None)[source]#

How one evidence path fared.

Parameters:
legLegKind

Which evidence path this describes.

statusLegStatus

Outcome for this leg.

hit_countint, optional

Hits contributed before fusion.

generationint or None, optional

Index generation the leg ran against, for provenance.

backendstr or None, optional

Backend that served the leg, when applicable.

errorErrorRecord or None, optional

Required when status is DEGRADED or FAILED.

Raises:
ValueError

If status is DEGRADED or FAILED and error is None.

Parameters:

Notes

Developer. The error-required invariant is enforced in __post_init__ rather than documented, because an unexplained degradation is exactly as unhelpful as no degradation signal at all.

backend: str | None = None#
error: ErrorRecord | None = None#
generation: int | None = None#
hit_count: int = 0#
leg: LegKind[source]#
property ran: bool#

Whether the leg actually executed.

status: LegStatus[source]#
to_dict()[source]#

Return a JSON-compatible mapping.

Return type:

dict[str, Any]