我不确定这里的"最佳方法"是什么意思,但考虑到混淆矩阵,计算应该是直截了当的.在Python中:
import math
# tp is true positives, fn is false negatives, etc
mcc = (tp*tn - fp*fn) / math.sqrt( (tp + fp)*(tp + fn)*(tn + fp)*(tn + fn) )
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2572 次 |
| 最近记录: |