Skip to content

Commit

Permalink
6 decimal -> uncertainty
Browse files Browse the repository at this point in the history
  • Loading branch information
yotarazona authored Oct 18, 2024
1 parent 4ab2416 commit 6ddb29f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scikeo/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def confintervalML(matrix, image_pred, pixel_size = 10, conf = 1.96, nodata = No
namesRow.extend(['Total'])

# error matrix (DataFrame) in proportions of area
cm_prop_area = pd.DataFrame(np.round(mat_conf, 4), columns = namesCol, index = namesRow)
cm_prop_area = pd.DataFrame(np.round(mat_conf, 6), columns = namesCol, index = namesRow)

# overall accuracy
oa = np.diag(matConf).sum()/np.sum(matConf)
Expand Down Expand Up @@ -355,15 +355,15 @@ def print_info(params):
print('***** Confusion Matrix by Estimated Proportions of area an uncertainty*****')
print('')
print('Overall accuracy with 95%')
print(f'{oa:.4f} ± {e:.4f}')
print(f'{oa:.6f} ± {e:.6f}')
print('')
print('Confusion matrix')
print(matrixCEA)
print('')
print('User´s accuracy with 95%')
for i in range(b.shape[0]):
print(f'{f[i]}: {a[i]:.4f} ± {b[i]:.4f}')
print(f'{f[i]}: {a[i]:.6f} ± {b[i]:.6f}')
print('')
print('Estimating area (Ha) and uncertainty with 95%')
for i in range(b.shape[0]):
print(f'{f[i]}: {c[i]:.4f} ± {d[i]:.4f}')
print(f'{f[i]}: {c[i]:.6f} ± {d[i]:.6f}')

0 comments on commit 6ddb29f

Please sign in to comment.