public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats) {final long df = termStats.docFreq();final long docCount = collectionStats.docCount();final float idf = idf(df, docCount);return Explanation.match(idf, "idf(docFreq, docCount)",Explanation.match(df, "docFreq, number of documents containing term"),Explanation.match(docCount, "docCount, total number of documents with field"));}
public virtual Explanation IdfExplain(CollectionStatistics collectionStats, TermStatistics termStats){long df = termStats.DocFreq;long max = collectionStats.MaxDoc;float idf = Idf(df, max);return new Explanation(idf, "idf(docFreq=" + df + ", maxDocs=" + max + ")");}