ProximityValidation#

class ProximityValidation(config)#

Bases: Analyzer

The proximity validation Analyzer creates the necessary files for the metrics and confusion matrix in the AI Studio Validation screens.

Intput - the content of the label_field and the tag_field field needs to be of type list [ list [ str ] ]. Only the 1st element of the 2nd level list is incorporated. In addition, the 1st level lists of both fields needs to be of same length.

Output - there is no output field, the validation info is stored in the kfold_validation.json file.

Parameters
  • type (str) – proximity_validation

  • input_field (str, None) –

    Field to use as original text

    Deprecated since version 3.6.3.

  • input_fields (list, None) –

    List of fields to use as original text

    Deprecated since version 3.6.3.

  • not_class (str, None) – This class includes all neg/opposite elements, which do not belong to any other class

Example

{
    "step": "analyzer",
    "type": "proximity_validation",
    "label_field": "label",
    "tag_field": "prediction"
}

Methods Summary

process(docs)

Process a set of documents

train(docs)

Train on a step of a set of documents

Methods Documentation

process(docs)#

Process a set of documents

Parameters

docs (generator(Document)) – Generator of documents

Returns

Analysis

Return type

dict

train(docs)#

Train on a step of a set of documents

Parameters

docs (generator(Document)) – Generator of documents

Returns

Generator of processed documents

Return type

generator(Document)