-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7f89c1
commit e2078cd
Showing
3 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,3 +107,4 @@ ENV/ | |
*.pth | ||
results/* | ||
!results/result_default_settings.csv | ||
!results/summary.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]}} |