Class DocumentCategorizerEvaluator
The DocumentCategorizerEvaluator measures the performance of the given IDocumentCategorizer with the provided reference DocumentSamples.
public class DocumentCategorizerEvaluator : Evaluator<DocumentSample>
- Inheritance
-
DocumentCategorizerEvaluator
- Inherited Members
Constructors
DocumentCategorizerEvaluator(IDocumentCategorizer, params IDoccatEvaluationMonitor?[]?)
Initializes the current instance.
public DocumentCategorizerEvaluator(IDocumentCategorizer categorizer, params IDoccatEvaluationMonitor?[]? listeners)
Parameters
categorizerIDocumentCategorizerthe document categorizer instance
listenersIDoccatEvaluationMonitor[]an array of evaluation listeners
Properties
Accuracy
Retrieves the accuracy of provided IDocumentCategorizer.
accuracy = correctly categorized documents / total documents
public virtual double Accuracy { get; }
Property Value
DocumentCount
public virtual long DocumentCount { get; }
Property Value
Methods
ProcessSample(DocumentSample)
Evaluates the given reference DocumentSample object.
This is done by categorizing the document from the provided DocumentSample. The detected category is then used to calculate and update the score.
protected override DocumentSample ProcessSample(DocumentSample reference)
Parameters
referenceDocumentSamplethe reference DocumentSample.
Returns
- DocumentSample
the predicted DocumentSample.
ToString()
Represents this objects as human readable string.
public override string ToString()