Skip to content

Commit

Permalink
✨ Updated results analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomontesg committed May 16, 2018
1 parent c7f89c1 commit e2078cd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,4 @@ ENV/
*.pth
results/*
!results/result_default_settings.csv
!results/summary.json
35 changes: 28 additions & 7 deletions analyze_report.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
import pandas as pd
""" Analyse Global Summary
"""
import json

import matplotlib.pyplot as plt

# Plot the evolution of the IoU with the number of interactions
df = pd.read_csv('results/result_default_settings.csv', index_col=0)
df.groupby('interaction').jaccard.mean().plot()
plt.ylabel('IoU')
plt.xlabel('Number of Interactions')
plt.show()

def main():
with open('results/summary.json', 'r') as fp:
summary = json.load(fp)

print('AUC: \t{:.3f}'.format(summary['auc']))
th = summary['jaccard_at_threshold']['threshold']
jac = summary['jaccard_at_threshold']['jaccard']
print('J@{}: \t{:.3f}'.format(th, jac))

time = summary['curve']['time']
jaccard = summary['curve']['jaccard']

plt.plot(time, jaccard)
plt.ylim([0, 1])
plt.xlim([0, max(time)])
plt.xlabel('Accumulated Time (s)')
plt.ylabel(r'Jaccard ($\mathcal{J}$)')
plt.axvline(th, c='k')
plt.show()


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions results/summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"auc": 0.4395849036107108, "jaccard_at_threshold": {"threshold": 60, "jaccard": 0.13814099113370165}, "curve": {"time": [0.0, 182.9943927637215, 367.24760377732787, 552.1450818549089, 737.1844214142346, 922.2802342873454, 922.2802342873454, 922.2802342873454, 922.2802342873454, 1016.6666666666666], "jaccard": [0.0, 0.4213171131381728, 0.47352851737476515, 0.49626481863129723, 0.5066457327001461, 0.5166989024863489, 0.5166989024863489, 0.5166989024863489, 0.5166989024863489, 0.5166989024863489]}}

0 comments on commit e2078cd

Please sign in to comment.