August 15, 2023

Evaluating and generating a classification model – Docs for ESB 6.x

Evaluating and generating a classification model

The tNLPModel component reads training data in CoNLL format to
evaluate and generate a classification model.

  1. Double click the tNLPModel component to open its
    Basic settings view and define its properties.

    use_case_tnlpmodel3.png

    1. Click the [+] button under the
      Feature template table to add rows to the
      table.
    2. Click in the Features column to select the
      features to be generated.
    3. For each feature, specify the relative position.

      For example -2,-1,0,1,2 means that you use the
      current token, the preceding two and the following two context
      tokens as features.

    4. From the NLP Library list, select the same
      library you used for preprocessing the training text data.
  2. To evaluate the model, select the Run cross validation
    evaluation
    check box and enter 2 in the
    Fold field.

    This means the training data is partitioned into two pieces: the training
    data set and the test data set. The validation process is repeated
    twice.


  3. Press F6 to save and execute the
    Job.

    The results from the K-fold cross-validation process are displayed on the
    Run view:

    • Precision is the ratio of correctly predicted named
      entities to the total number of predicted named entities.
    • Recall is the ratio of correctly predicted named
      entities to the total number of named entities.
    • F1 score is the harmonic mean between
      recall and precision.

  4. Clear the Run cross validation evaluation check
    box.
  5. Select the Save the model on file system check box to
    save the model locally in the folder specified in the
    Folder field.

  6. Press F6 to save and execute the
    Job.

The model files are stored in the specified folder. You can now use the generated
model with the tNLPPredict component to predict named entities
and label text data automatically.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x