混淆矩阵的Nan值

时间:2020-05-03 03:58:43

标签: python algorithm nan confusion-matrix

class Query(graphene.ObjectType):
    all_report_files = DjangoFilterConnectionField(ReportFileNode, filterset_class=ReportFileFilter)

精度是nan。
灵敏度是:nan。
特异性是:nan。

TP=k.iloc[1,1]
TN=k.iloc[0,0]
FP=k.iloc[0,1]
FN=k.iloc[1,0]
P=TP+FN
N=TN+FP 

print('Accuracy is :',(TP+TN)/(P+N))
print('Sensitivity is :',TP/P)
print('Specificity is :',TN/N)

0 个答案:

没有答案