AlvisNLP

corpus processing engine

CompareFeatures

Synopsis

Compare two features in a set of elements.

Description

CompareFeatures compares the value of referenceFeature and predictedFeature in the elements specified by items . The comparison is aggregated using standard metrics (accuracy, recall, precision and F-score). CompareFeatures is useful to evaluate classification predictions against a reference.

The results are displayed in the log and written in the file specified by outFile .

By default the metrics are computed for each distinct value of referenceFeature and predictedFeature . If classesOfInterest is set, then CompareFeatures will only compute metrics for the specified values.

Snippet

<comparefeatures class="CompareFeatures">
    <items></items>
    <outFile></outFile>
    <predictedFeature></predictedFeature>
    <referenceFeature></referenceFeature>
</comparefeatures>

Mandatory parameters

items

Mandatory
Type: Expression

Elements for which to compare both features. items is evaluated from the corpus.

outFile

Mandatory

File where to write results.

predictedFeature

Mandatory
Type: String

Feature containing the predicted value.

referenceFeature

Mandatory
Type: String

Feature containing the reference value.

Optional parameters

classesOfInterest

Optional
Type: String[]

Values for which metrics are computed. All values if not set.

Deprecated parameters