ranklens.viz¶
ranklens.viz
¶
Charts of results (plotly, extra viz).
attribution_heatmap
¶
attribution_heatmap(
diagnoses: Sequence[QueryDiagnosis],
) -> Figure
Features by the worst queries: red where shuffling a feature helps (it misleads).
Source code in src/ranklens/viz/charts.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
delta_distribution
¶
delta_distribution(
baseline: MetricResult, candidate: MetricResult
) -> Figure
Histogram of per-query differences: the tails matter more than the mean.
Source code in src/ranklens/viz/charts.py
80 81 82 83 84 85 86 87 88 | |
metric_vs_k
¶
metric_vs_k(
evaluations: Mapping[str, Evaluation],
metric: str = "ndcg",
) -> Figure
One line per run: the mean of metric@k for every cutoff the evaluations hold.
Source code in src/ranklens/viz/charts.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
propensity_diagnostics
¶
propensity_diagnostics(
diagnostics: WeightDiagnostics,
) -> Figure
Distribution of the weights 1/p, with the effective sample size in the title.
Source code in src/ranklens/viz/charts.py
138 139 140 141 142 143 144 145 146 | |
rank_flow
¶
rank_flow(
pairs: Iterable[tuple[RankedList, RankedList]],
k: int = 10,
) -> Figure
Where documents of A's top k end up in B (and where B's top comes from).
Source code in src/ranklens/viz/charts.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
segment_gains
¶
segment_gains(
comparisons: Mapping[str, ComparisonResult],
) -> Figure
Difference per segment with its interval; significant ones (after BH) stand out.
Source code in src/ranklens/viz/charts.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |