Skip to content

Commit

Permalink
improvements to graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisk42 committed Nov 27, 2019
1 parent a3f04ee commit 9cae929
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
15 changes: 13 additions & 2 deletions bin/analyzeDepth.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,26 @@ def loadCheckpoint(r):
x = sum(d_ > 1 for d_ in d)
elif mode == "MAX":
x = max(d)
# jitter
adjustment = random.random()
adjustment -= 0.5
adjustment*=0.5
x += adjustment
else:
assert False
X.append(x)

factor = (i+7)/(20+7)
if results is fullResults:
c = (factor,0.,1.)
#003f5c
c = (0.,
factor*63./256.,
factor*92./256.)
elif results is lesionResults:
c = (0.,factor,0.)
# "#ef5675"
c = (factor*239./256.,
factor*86./256.,
factor*117./256.)
C.append(c)

plot.figure(figsize=(4,2.5))
Expand Down
4 changes: 3 additions & 1 deletion bin/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,10 @@ def plotECResult(

if arguments.palette:
# taken from https://learnui.design/tools/data-color-picker.html
# we need to make sure that purple and teal are mapped onto colors that contrasts nicely
# because we use these color schemes in other plots
mapping = dict(zip(["teal","orange","purple","cyan"],
["#003f5c","#ffa600","#7a5195","#ef5675"]))
["#003f5c","#ffa600","#ef5675","#7a5195"]))
arguments.checkpoints = [mapping.get(ck,ck)
for ck in arguments.checkpoints ]

Expand Down
4 changes: 3 additions & 1 deletion official_figures
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,6 @@ python bin/scientificLaws.py --primitive-graph `grep -h it=.*graph jobs/scienti
python bin/list.py --primitive-graph experimentOutputs/list_aic=1.0_arity=4_ET=11640_expandFrontier=4.0_it=4_MF=5_baseline=False_pc=30.0_RW=False_storeTask=False_L=1.0_taskReranker=default_K=2_topkNotMAP=False_rec=False.pickle

# this will show you the correlation between depth and accuracy
python bin/analyzeDepth.py --recognition `grep -h it=20.*graph jobs/tower_batch_50_3600*` `grep -h it=20.*graph jobs/logo_batch_50*` `grep -h it=20.*graph jobs/list_hard_test_ellisk*` `grep -h it=20.*graph jobs/text_ellisk_2019-01-2*` `grep -h it=20.*graph jobs/rational_batch*` --generative `grep -h 'it=20.*.pickle' jobs/text_no_recognition_ellisk*|sed 's/Exported checkpoint to//g'` `grep -h 'it=20.*.pickle' jobs/list_hard_test_no_recognition_ellisk*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/logo_no_recognition_batch_50_1h*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/rational_noRecognition*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/tower_no_recognition_batch_50_3600*|sed 's/Exported checkpoint to//g'` --legend MEAN
python bin/analyzeDepth.py --recognition `grep -h it=20.*graph jobs/tower_batch_50_3600*` `grep -h it=20.*graph jobs/logo_batch_50*` `grep -h it=20.*graph jobs/list_hard_test_ellisk*` `grep -h it=20.*graph jobs/text_ellisk_2019-01-2*` `grep -h it=20.*graph jobs/rational_batch*` --generative `grep -h 'it=20.*.pickle' jobs/text_no_recognition_ellisk*|sed 's/Exported checkpoint to//g'` `grep -h 'it=20.*.pickle' jobs/list_hard_test_no_recognition_ellisk*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/logo_no_recognition_batch_50_1h*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/rational_noRecognition*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/tower_no_recognition_batch_50_3600*|sed 's/Exported checkpoint to//g'` --legend MEAN

python bin/analyzeDepth.py --recognition `grep -h it=20.*graph jobs/tower_batch_50_3600*` `grep -h it=20.*graph jobs/logo_batch_50*` `grep -h it=20.*graph jobs/list_hard_test_ellisk*` `grep -h it=20.*graph jobs/text_ellisk_2019-01-2*` `grep -h it=20.*graph jobs/rational_batch*` --generative `grep -h 'it=20.*.pickle' jobs/text_no_recognition_ellisk*|sed 's/Exported checkpoint to//g'` `grep -h 'it=20.*.pickle' jobs/list_hard_test_no_recognition_ellisk*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/logo_no_recognition_batch_50_1h*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/rational_noRecognition*|sed 's/Exported checkpoint to//g'` `grep -h it=20.*pickle jobs/tower_no_recognition_batch_50_3600*|sed 's/Exported checkpoint to//g'` --every

0 comments on commit 9cae929

Please sign in to comment.