public final Explanation explain(BasicStats stats, double tfn) {return Explanation.match((float) (scoreTimes1pTfn(stats) / (1 + tfn)),getClass().getSimpleName()+ ", computed as (F + 1) / (n * (tfn + 1)) from:",Explanation.match((float) tfn, "tfn, normalized term frequency"),Explanation.match(stats.getTotalTermFreq(),"F, total number of occurrences of term across all documents + 1"),Explanation.match(stats.getDocFreq(),"n, number of documents containing term + 1"),Explanation.match((float) tfn, "tfn, normalized term frequency"));}
public override sealed Explanation Explain(BasicStats stats, float tfn){Explanation result = new Explanation();result.Description = this.GetType().Name + ", computed from: ";result.Value = Score(stats, tfn);result.AddDetail(new Explanation(tfn, "tfn"));result.AddDetail(new Explanation(stats.TotalTermFreq, "totalTermFreq"));result.AddDetail(new Explanation(stats.DocFreq, "docFreq"));return result;}