How to calculate precision and recall in Keras

后端 未结 5 612
别跟我提以往
别跟我提以往 2020-12-13 03:47

I am building a multi-class classifier with Keras 2.02 (with Tensorflow backend),and I do not know how to calculate precision and recall in Keras. Please help me.

5条回答
  •  臣服心动
    2020-12-13 04:33

    As of Keras 2.0, precision and recall were removed from the master branch. You will have to implement them yourself. Follow this guide to create custom metrics : Here.

    Precision and recall equation can be found Here

    Or reuse the code from keras before it was removed Here.

    There metrics were remove because they were batch-wise so the value may or may not be correct.

提交回复
热议问题