String renders the metrics as a single aligned line for logs and benchmark output.
()
| 142 | // String renders the metrics as a single aligned line for logs and benchmark |
| 143 | // output. |
| 144 | func (m Metrics) String() string { |
| 145 | return fmt.Sprintf( |
| 146 | "n=%d k=%d recall@k=%.4f precision@k=%.4f MRR=%.4f nDCG@k=%.4f", |
| 147 | m.N, m.K, m.RecallAtK, m.PrecisionAtK, m.MRR, m.NDCGAtK, |
| 148 | ) |
| 149 | } |
| 150 | |
| 151 | // Comparison reports the delta between a baseline and a candidate strategy on |
| 152 | // the same sample set — the artifact an A/B (keyword vs. semantic blend) |
no outgoing calls