# Transformers Text Classification Example: Compute Precision, Recall and F1

**URL:** <https://discuss.huggingface.co/t/transformers-text-classification-example-compute-precision-recall-and-f1/13363>\
**Category:** 🤗Transformers\
**Created:** [January 4, 2022, 10:26am UTC](https://discuss.huggingface.co/t/transformers-text-classification-example-compute-precision-recall-and-f1/13363 "2022-01-04T10:26:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mox](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mox](https://discuss.huggingface.co/u/mox)\
**Post date:** [January 4, 2022, 10:26am UTC](https://discuss.huggingface.co/t/transformers-text-classification-example-compute-precision-recall-and-f1/13363/1 "2022-01-04T10:26:04Z")

</div>

Hello,

I am using [this](https://github.com/huggingface/transformers/tree/master/examples/tensorflow/text-classification) text classification tutorial from Huggingface with my own train, test and validation data.

My goal is to compute a classification report with all the metrics in it (F1, accuracy, Recall, Precision), but I don’t know how to do this with this example script.

The script runs well and at the end i get following message: “INFO - **main** - Wrote predictions to output/test\_results.txt!”

In the “output”-Folder I see these files: “config.json”, “test\_results.txt” and “tf\_model.h5”.

So how can I can evaluate my trained model?

Thanks in advance!!
