简体   繁体   中英

Keras metrics: calculating the results of only one class in binary classification

我有一个二元分类任务,我很想获得关于 1 的准确度:即,在评估模型时(在训练阶段),我希望 Keras 仅返回(作为度量)数字在 1 的总数中正确的 1(即,0 被简单地忽略):是否有 Keras 指标这样做?

I think what you're looking for is recall, assuming '1' as the positive class:

recall = true_positive / (true_positive + false_negative)

https://en.wikipedia.org/wiki/Precision_and_recall

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM