Post

KerasKeras

c
chris bons

Posted on 4th March 2024|23 views

0
votes

Keras Metrics F1

How can I calculate f1 macro in Keras?

Answers
P
Anthony A

Posted on 4th March 2024

  1. y_pred=self. model. predict(x_test). round()
  2. y_true=y_test.
  3. score=f1_score(y_true, y_pred, average='macro')
  4. self. f1_macro. append(score)
  5. print("the calculated F1 macro is :",score)

If you are looking for the Keras certification course, you can check out this online Keras Training and Improve your knowledge in Keras.

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos