Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbing committed Jun 29, 2017
1 parent 07ba227 commit 0bfb05a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hypertector/code/hypertector.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,12 +647,12 @@ def cal_kappa(result_mat):
pe_zong = result_matrix[0:classes,j].sum()
pe_heng = result_matrix[j,0:classes].sum()
pe = pe + pe_zong * pe_heng
sum = sum + pe_zong + pe_heng
sum = result_matrix.sum()

for k in range(classes):
pa = pa + result_matrix[k][k]

pe = (pe / sum) / sum
pe = pe / (sum * sum)
pa = pa / sum

kappa = (pa - pe)/(1-pe)
Expand Down

0 comments on commit 0bfb05a

Please sign in to comment.