PlannedHit#

class scikitplot.corpus.PlannedHit(hit, score, key, fused_score=None, rerank_score=None, query_ranks=())[source]#

One ranked hit of a plan, with the score of each stage that ranked it.

Parameters:
hitobject

The hit as index.search returned it (for a document several queries found: from the first such query).

scorefloat

The value the hit is ranked by: the rerank score when it was reranked, else the fused score, else the search score.

keystr

Its identity (doc_id, else node_id), on which fusion keys.

fused_scorefloat or None, default=None

The cross-query fusion score, when two or more queries ran.

rerank_scorefloat or None, default=None

The reranker’s score, when the hit was reranked.

query_rankstuple of (int or None), default=()

Zero-based rank of the hit in each query’s ranking, None where a query did not return it; aligned with ExecutionResult.queries.

Parameters:
property doc: Any#

The matched document (hit.doc, else the hit itself).

property doc_id: str#

The hit’s identity.

fused_score: float | None = None#
hit: Any[source]#
key: str[source]#
query_ranks: tuple[int | None, ...] = ()#
rerank_score: float | None = None#
score: float[source]#