Method Explain
Explain(Explanation, BasicStats, Int32, Single, Single)
Subclasses should implement this method to explain the score. expl
already contains the score, the name of the class and the doc id, as well
as the term frequency and its explanation; subclasses can add additional
clauses to explain details of their scoring formulae.
The default implementation does nothing.
Declaration
protected virtual void Explain(Explanation expl, BasicStats stats, int doc, float freq, float docLen)
Parameters
Type | Name | Description |
---|---|---|
Explanation | expl | the explanation to extend with details. |
BasicStats | stats | the corpus level statistics. |
System.Int32 | doc | the document id. |
System.Single | freq | the term frequency. |
System.Single | docLen | the document length. |
Explain(BasicStats, Int32, Explanation, Single)
Explains the score. The implementation here provides a basic explanation in the format Score(name-of-similarity, doc=doc-id, freq=term-frequency), computed from:, and attaches the score (computed via the Score(BasicStats, Single, Single) method) and the explanation for the term frequency. Subclasses content with this format may add additional details in Explain(Explanation, BasicStats, Int32, Single, Single).
Declaration
public virtual Explanation Explain(BasicStats stats, int doc, Explanation freq, float docLen)
Parameters
Type | Name | Description |
---|---|---|
BasicStats | stats | the corpus level statistics. |
System.Int32 | doc | the document id. |
Explanation | freq | the term frequency and its explanation. |
System.Single | docLen | the document length. |
Returns
Type | Description |
---|---|
Explanation | the explanation. |