v0.5.0
FusionDebugger for transparent pipeline inspection
FusionDebugger records every intermediate value through the full Bayesian BM25 probability pipeline (likelihood, prior, posterior, fusion) so that the final fused score can be fully explained.
New features
FusionDebuggerclass (bayesian_bm25.debug)trace_bm25(),trace_vector(),trace_fusion(),trace_document(),trace_not()compare()with dominant signal and crossover detectionformat_trace(),format_summary(),format_comparison()
- All four fusion methods as
methodparameter:log_odds,prob_and,prob_or,prob_notprob_and: recordslog_probsandlog_prob_sumintermediatesprob_or: recordscomplements,log_complements,log_complement_sumintermediatesprob_not: computesprod(1 - p_i)-- probability that NONE of the signals indicate relevance
- Hierarchical (nested) fusion --
trace_fusion()outputs compose into arbitrary trees such asAND(OR(title, body), vector, NOT(spam)) - Weighted log-odds fusion via
weightsparameter - 92 new tests (413 total), 12-example script (
examples/fusion_debugger.py)
Install
pip install bayesian-bm25==0.5.0