From 02a624133ff2db7506e4c9af8f37f4ac57e378ef Mon Sep 17 00:00:00 2001 From: Sukkrit Sharma Date: Tue, 22 Sep 2020 02:10:16 +0530 Subject: [PATCH 1/4] =?UTF-8?q?Fixed=20plots=20for=20CNNs=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes libra/plotting/generate_plots.py | 2 +- libra/queries.py | 6 ++++-- libra/query/feedforward_nn.py | 26 ++++++++++++++++++++++++-- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9f594abee29812ab559a1e35959bb10267d69454 GIT binary patch literal 6148 zcmeHK-EPw`6h7YCk+wps5Yl#;8ze5Oshu_^gpf*qK$V~%THpdu*Q{ZSNR!f}lu?R$ z!#eX$7IX` zr2Mkvl0z1ash{%vp7JcvUCgzP_}kP$zC$6sp)kpk5r2$DT%db&3ycVBCzQdP0%}+hDaV}7_6SB;OOG~96W9KPiO?j5xt<} z)Ex0Hg%OL)NH9ipn({|X3I8m5x52@jlAiqT&hoUT!ASj|zFH&K3Bq#un^;@VWH&At zM&8I@%s=m(_|s0<4<|vbKYq$j5BlMWrOI93cYl@p)?>$>_KKJ5z8Cf#&mK#%GqBp&*20Kg2YrJ>B92h1@QRuwKHL<>wrRA59E>WU#E zI_gd3S5>%(Frt%Cmk*&v7V3r~w*}4=QpS32^Arc$=Eh3Z@Wa>DU1wM+mk))x`', 'Final training accuracy: {}'.format(history.history['accuracy'][len(history.history['accuracy']) - 1])) logger('->', 'Final validation accuracy: {}'.format( @@ -816,6 +837,7 @@ def convolutional(instruction=None, 'data': {'train': X_train, 'test': X_test}, 'shape': input_shape, "model": model, + "plots": plots, 'losses': { 'training_loss': history.history['loss'], 'val_loss': history.history['val_loss']}, From 45d882f06375e6f09acaab1cebe30420fcb79ee4 Mon Sep 17 00:00:00 2001 From: Sukkrit Sharma Date: Tue, 22 Sep 2020 02:16:00 +0530 Subject: [PATCH 2/4] =?UTF-8?q?Fixed=20plots=20for=20CNNs=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 6148 -> 8196 bytes .gitignore | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 9f594abee29812ab559a1e35959bb10267d69454..4b1ae221d63570dad19be6f4db743eb0709b0e0f 100644 GIT binary patch delta 582 zcmZ`%%}T>S7@U%|yO@X;wAS`g?@}6DMDU^og&xF%4rZhr#tGd z*Kl0VQDBr2Sr!$=t?|T#2&ZhKXbdH^(ZNusl6sY}htK$<6Tp9YIKv1|f_*~@@ju(S z8uWf*yg5C$GZ>c3?-QQ6+4p;WeHf$y!&z`8hkWrs#MN^+F&|tow+~8KhxfTRw>j delta 124 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50D9R6#2aCls_%paM#4|WE_-`y+ z&dkU^nMHWx=4~Qg%!}DMI0Tu23V}d?8%Vf<4A@xsoq009j3>xA1}2EnAln!=$Mei# F1^|T#5_JFo diff --git a/.gitignore b/.gitignore index 552c6d13..5de52498 100644 --- a/.gitignore +++ b/.gitignore @@ -130,4 +130,5 @@ venv.bak/ dmypy.json # Pyre type checker -.pyre/ \ No newline at end of file +.pyre/ +.DS_Store \ No newline at end of file From edeb8e86d0bc222f0342a6970bf63e4b45bb6d98 Mon Sep 17 00:00:00 2001 From: Sukkrit Sharma <44338419+sukkritsharmaofficial@users.noreply.github.com> Date: Tue, 22 Sep 2020 20:55:30 +0530 Subject: [PATCH 3/4] Delete .DS_Store --- .DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 4b1ae221d63570dad19be6f4db743eb0709b0e0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM&2G~`5T0$*)=7jKA*5EEd_m$+p{BnegcQ;Q6bT9<0Siu z-T`<69)&01L3jZ8X4j4EO>?Rg71*u3v)-N0v-xIs*5eY9$aia5qGckoaIws!QJqtG zoUgGm6ZTw(6u?u-3l1DFaB!a)(>5K30mFb{z%XDKFbrG<25@F`u_m1RYSh$*0mHz5 z$pFU(8yCx5D2GbQ(1A*(0FViE%YwFi^@p^%12PxNp_1r95ef>apdw5$M3^}U1;=bqu;^;0^Pa?#nf$2c6O2=?Y8+WJFAWuVm z*HAo*%wG`96WDZ-uy@uVizIEZ< z6#J2yyAmN;ZH*`do*1cfG~VSOB|JM$P-~L=S_!KVxAqO^@k5 z5G5>`B5=G=T=L_#h+Q2Go=Gf_B5(zu+0xk368t-&hz!RHdXG@+%2oq+K4!=f;hcF2 z{&i7&5}I{rcBu)(0llR|ZH^pyq9NOgA)0im>2u79>d)cnbzm^3xTcIZ6ErW`(%rm+ zrMt0q@q-{jhPH5dB*33HMiX2XBNQH-VwqL8mO1|~PX7Ks#Tgk>h5^ICv>6bILb;HK z)wB0peFB_o+qm{|abdlok`jVSrsI$@9futK!w_v7s*K5na;PMFP^SJNAoB8N&j0xF OW6u8zB!Yk0`Tqw+l)-lZ From 199ddde0b9e930cb1ef35f4247064192850e7c2b Mon Sep 17 00:00:00 2001 From: Sukkrit Sharma Date: Tue, 22 Sep 2020 21:33:59 +0530 Subject: [PATCH 4/4] Fixed generate_classification_plots --- libra/query/nlp_queries.py | 3 +-- libra/query/supplementaries.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libra/query/nlp_queries.py b/libra/query/nlp_queries.py index 6e019aac..1ccba980 100644 --- a/libra/query/nlp_queries.py +++ b/libra/query/nlp_queries.py @@ -208,8 +208,7 @@ def text_classification_query(self, instruction, drop=None, # generates appropriate classification plots by feeding all # information logger("Generating plots") - plots = generate_classification_plots( - history, X, Y, model, X_test, y_test) + plots = generate_classification_plots(history) if save_model: save(model, save_model, save_path=save_path) diff --git a/libra/query/supplementaries.py b/libra/query/supplementaries.py index fe38cac4..03a44fb7 100644 --- a/libra/query/supplementaries.py +++ b/libra/query/supplementaries.py @@ -177,8 +177,7 @@ def tune_helper( logger("->", 'Best Hyperparameters Found: {}'.format(returned_pms.values)) if generate_plots: logger("Generating updated plots") - plots = generate_classification_plots( - history, data, target_column, returned_model, X_test, y_test) + plots = generate_classification_plots(history) logger("Re-stored model under 'classification_ANN' key")