Commit cf19904c authored by Ard Kastrati's avatar Ard Kastrati
Browse files

Merge branch 'master' of https://gitlab.ethz.ch/kard/dl-project

parents 4d736898 494c3854
......@@ -42,6 +42,7 @@ Cluster can be set to clustering(), clustering2() or clustering3(), where differ
"""
# Choosing model
config['model'] = 'eegnet'
config['model'] = 'cnn'
config['downsampled'] = False
config['split'] = False
......
......@@ -38,8 +38,8 @@ def run(trainX, trainY):
elif config['model'] == 'pyramidal_cnn':
classifier = Classifier_PyramidalCNN(input_shape=config['cnn']['input_shape'], epochs=50)
elif config['model'] == 'eegnet':
classifier = Classifier_EEGNet(dropoutRate = 0.5, kernLength = 250, F1 = 16,
D = 4, F2 = 256, norm_rate = 0.5, dropoutType = 'Dropout',
classifier = Classifier_EEGNet(dropoutRate = 0.5, kernLength = 64, F1 = 32,
D = 8, F2 = 512, norm_rate = 0.5, dropoutType = 'Dropout',
epochs = 50)
elif config['model'] == 'inception':
classifier = Classifier_INCEPTION(input_shape=config['inception']['input_shape'], use_residual=True,
......
......@@ -2,7 +2,7 @@ from config import config
from ensemble import run
import numpy as np
import scipy
from utils.utils import select_best_model, comparison_plot
from utils.utils import select_best_model, comparison_plot_accuracy, comparison_plot_loss
from utils import IOHelper
from scipy import io
import h5py
......@@ -18,17 +18,17 @@ def main():
logging.info('Started the Logging')
start_time = time.time()
# try:
trainX, trainY = IOHelper.get_mat_data(config['data_dir'], verbose=True)
# trainX, trainY = IOHelper.get_mat_data(config['data_dir'], verbose=True)
if config['model'] == 'eegnet' or config['model'] == 'eegnet_cluster':
trainX = np.transpose(trainX, (0, 2, 1))
logging.info(trainX.shape)
# if config['model'] == 'eegnet' or config['model'] == 'eegnet_cluster':
# trainX = np.transpose(trainX, (0, 2, 1))
# logging.info(trainX.shape)
# tune(trainX,trainY)
run(trainX,trainY)
# run(trainX,trainY)
# select_best_model()
# comparison_plot()
comparison_plot_loss()
logging.info("--- Runtime: %s seconds ---" % (time.time() - start_time))
logging.info('Finished Logging')
......
results/OHBM/comparison_accuracy.png

57.1 KB | W: | H:

results/OHBM/comparison_accuracy.png

72.4 KB | W: | H:

results/OHBM/comparison_accuracy.png
results/OHBM/comparison_accuracy.png
results/OHBM/comparison_accuracy.png
results/OHBM/comparison_accuracy.png
  • 2-up
  • Swipe
  • Onion skin
epoch;accuracy;loss;val_accuracy;val_loss
0;0.7360066175460815;0.5412320494651794;0.7722567319869995;0.51458740234375
1;0.7810062766075134;0.4762488305568695;0.8045548796653748;0.44342902302742004
2;0.7980881929397583;0.44069820642471313;0.7855072617530823;0.5043510794639587
3;0.8202429413795471;0.3974359929561615;0.8472049832344055;0.3682668209075928
4;0.833839476108551;0.37750244140625;0.8489993214607239;0.3614393174648285
5;0.8389122486114502;0.3613109290599823;0.8472049832344055;0.5009607672691345
6;0.8491959571838379;0.34784501791000366;0.8502415418624878;0.3434582054615021
7;0.8522672653198242;0.3406803607940674;0.8611456155776978;0.3431328535079956
8;0.8540272116661072;0.33378177881240845;0.8571428656578064;0.3405262231826782
9;0.8600317239761353;0.3264171779155731;0.8622498512268066;0.34335339069366455
10;0.8599972128868103;0.3210669159889221;0.8455486297607422;0.3517245054244995
11;0.8613430857658386;0.3182573616504669;0.8668047189712524;0.3179105520248413
12;0.8644834160804749;0.3141590654850006;0.8687370419502258;0.320552259683609
13;0.8651735782623291;0.3115987479686737;0.8650103807449341;0.3595457673072815
14;0.8662433624267578;0.30640822649002075;0.847895085811615;0.34582099318504333
15;0.8703499436378479;0.30400028824806213;0.8556245565414429;0.43270283937454224
16;0.8704534769058228;0.2988716959953308;0.8615596890449524;0.3590811789035797
17;0.8736627697944641;0.29787033796310425;0.852173924446106;0.3331166207790375
18;0.8768376111984253;0.2887420356273651;0.8774327039718628;0.3020922541618347
19;0.8782524466514587;0.2836143672466278;0.87508624792099;0.3122316002845764
20;0.8764579892158508;0.28674525022506714;0.8759143948554993;0.30717676877975464
21;0.8765960335731506;0.2822008728981018;0.872877836227417;0.3147009015083313
22;0.8826006054878235;0.2780378460884094;0.8669427037239075;0.3171131908893585
23;0.8830491900444031;0.27608442306518555;0.8695651888847351;0.3088815212249756
24;0.8819794058799744;0.277186781167984;0.7087646722793579;0.5191985368728638
25;0.883083701133728;0.27329328656196594;0.8770186305046082;0.30381810665130615
26;0.8867071866989136;0.26712286472320557;0.8637681007385254;0.31206533312797546
27;0.8862930536270142;0.26713985204696655;0.8759143948554993;0.3031681478023529
28;0.8869141936302185;0.2622399628162384;0.8761904835700989;0.30169782042503357
29;0.8904341459274292;0.26163116097450256;0.8807453513145447;0.3002432584762573
30;0.88988196849823;0.26033899188041687;0.8608695864677429;0.35817959904670715
31;0.8914003968238831;0.2584054470062256;0.8709454536437988;0.3265010118484497
32;0.8916419148445129;0.2563764452934265;0.8836438655853271;0.28757762908935547
33;0.8921250700950623;0.25395479798316956;0.8790889978408813;0.29320257902145386
34;0.8942991495132446;0.2495177984237671;0.8851621747016907;0.28377825021743774
35;0.8944371342658997;0.2497401237487793;0.8812974691390991;0.29819267988204956
36;0.8950928449630737;0.24702629446983337;0.8814354538917542;0.2902073860168457
37;0.8933328986167908;0.24747850000858307;0.861973762512207;0.38557079434394836
38;0.8954724073410034;0.24933680891990662;0.8811594247817993;0.2969922721385956
39;0.8988888263702393;0.24083764851093292;0.7717046141624451;0.4436202943325043
40;0.8982331156730652;0.24261102080345154;0.881573498249054;0.2895757853984833
41;0.8973703980445862;0.24107639491558075;0.8829537630081177;0.2939523458480835
42;0.8997170329093933;0.23918463289737701;0.877156674861908;0.2982233762741089
43;0.9003381729125977;0.23700477182865143;0.861973762512207;0.33663174510002136
44;0.9021326303482056;0.23539699614048004;0.883781909942627;0.2888169586658478
45;0.9015460014343262;0.23763823509216309;0.8790889978408813;0.3048742115497589
46;0.9018220901489258;0.23198984563350677;0.8832297921180725;0.29324063658714294
47;0.9041686654090881;0.22969497740268707;0.8864043951034546;0.29336583614349365
48;0.9023396968841553;0.23544393479824066;0.8669427037239075;0.34649592638015747
49;0.9035475254058838;0.2283649891614914;0.8835058808326721;0.286914199590683
0;0.7333839535713196;0.5437124371528625;0.775017261505127;0.4988148510456085
1;0.7745876312255859;0.4813292920589447;0.7595583200454712;0.5511904358863831
2;0.7925322651863098;0.45263928174972534;0.805383026599884;0.45623067021369934
3;0.8099247813224792;0.4187372624874115;0.7498964667320251;0.4884481132030487
4;0.8300780057907104;0.3831455111503601;0.853140115737915;0.36103716492652893
5;0.8417765498161316;0.3629365861415863;0.6561766862869263;0.5588829517364502
6;0.8461936712265015;0.3525788486003876;0.8590752482414246;0.3561684489250183
7;0.8554765582084656;0.3393203914165497;0.8541063070297241;0.3429185748100281
8;0.8564082980155945;0.3320627510547638;0.8082816004753113;0.4305979013442993
9;0.857581615447998;0.32941216230392456;0.866390585899353;0.3179515600204468
10;0.8619987368583679;0.3198678493499756;0.8683229684829712;0.32412189245224
11;0.8638277053833008;0.3141373097896576;0.8561766743659973;0.3861311674118042
12;0.8649320006370544;0.31324586272239685;0.8639061450958252;0.3226437270641327
13;0.8659327626228333;0.30817872285842896;0.8576949834823608;0.46861857175827026
14;0.871143639087677;0.3017219603061676;0.8683229684829712;0.35173118114471436
15;0.8712471723556519;0.2994604706764221;0.8775707483291626;0.3028522729873657
16;0.8738008141517639;0.2959970235824585;0.8752242922782898;0.31266915798187256
17;0.8742149472236633;0.29385384917259216;0.8759143948554993;0.3007139265537262
18;0.8779764175415039;0.28770339488983154;0.8383712768554688;0.366662859916687
19;0.8780799508094788;0.2813340425491333;0.8708074688911438;0.30443596839904785
20;0.8777003288269043;0.2816309928894043;0.8788129687309265;0.3043363392353058
21;0.8826351165771484;0.2769199013710022;0.8622498512268066;0.36743244528770447
22;0.8842570185661316;0.2730119824409485;0.7809523940086365;0.46052494645118713
23;0.880495548248291;0.2776857018470764;0.8579710125923157;0.36061230301856995
24;0.8858098983764648;0.2674334645271301;0.8760524392127991;0.2993446886539459
25;0.887293815612793;0.26837971806526184;0.8767426013946533;0.2993026375770569
26;0.8849471807479858;0.2707827091217041;0.8723257184028625;0.3067231774330139
27;0.8889157176017761;0.2622016668319702;0.8792270421981812;0.3058394193649292
28;0.8869141936302185;0.2633930444717407;0.861973762512207;0.34414952993392944
29;0.8893643617630005;0.2611986994743347;0.8777087926864624;0.2922305464744568
30;0.8918144702911377;0.2570270895957947;0.8727397918701172;0.31303924322128296
31;0.8905031681060791;0.2571181058883667;0.8717736601829529;0.32727038860321045
32;0.8917109370231628;0.25550171732902527;0.861007571220398;0.3956702947616577
33;0.8917109370231628;0.25420331954956055;0.8782608509063721;0.29146918654441833
34;0.895783007144928;0.24921928346157074;0.8774327039718628;0.28956446051597595
35;0.8925736546516418;0.2511078119277954;0.8680469393730164;0.3035518229007721
36;0.8948512673377991;0.2491927146911621;0.8833678364753723;0.2858636975288391
37;0.897508442401886;0.24435247480869293;0.8745341897010803;0.29459571838378906
38;0.8975429534912109;0.24346064031124115;0.8835058808326721;0.2887219786643982
39;0.8994064331054688;0.24069933593273163;0.8844720721244812;0.28276413679122925
40;0.8973358869552612;0.24607093632221222;0.8822636008262634;0.2822645306587219
41;0.8984746932983398;0.2415081113576889;0.883781909942627;0.28481525182724
42;0.8986127376556396;0.2414070963859558;0.850103497505188;0.3327977955341339
43;0.8972323536872864;0.2404242753982544;0.8713595867156982;0.33044546842575073
44;0.9005107283592224;0.23696640133857727;0.8811594247817993;0.2854391634464264
45;0.9026157855987549;0.23589204251766205;0.8721877336502075;0.30013027787208557
46;0.9025812745094299;0.2326195240020752;0.8639061450958252;0.3550805449485779
47;0.9028228521347046;0.23273897171020508;0.8826777338981628;0.2911800444126129
48;0.9019946455955505;0.23365260660648346;0.8723257184028625;0.30402570962905884
49;0.9026502966880798;0.22978883981704712;0.850103497505188;0.34638553857803345
0;0.7334184646606445;0.5451970100402832;0.7770876288414001;0.48294806480407715
1;0.780454158782959;0.47774675488471985;0.8011041879653931;0.44909846782684326
2;0.7953274846076965;0.4467960000038147;0.818495512008667;0.4401233494281769
3;0.8182414174079895;0.4094683527946472;0.8414078950881958;0.38184571266174316
4;0.8367727398872375;0.3746544122695923;0.8483091592788696;0.37004542350769043
5;0.8438470363616943;0.35968291759490967;0.8175293207168579;0.4349215030670166
6;0.8494719862937927;0.35064053535461426;0.852173924446106;0.35275208950042725
7;0.8514389991760254;0.3386355936527252;0.8274672031402588;0.40981605648994446
8;0.8557526469230652;0.3312140107154846;0.8545203804969788;0.39274489879608154
9;0.8566498756408691;0.3253413438796997;0.8672187924385071;0.3345158100128174
10;0.8632755875587463;0.31845641136169434;0.8375431299209595;0.39438116550445557
11;0.8631720542907715;0.3150331676006317;0.8672187924385071;0.33767256140708923
12;0.8658982515335083;0.30830463767051697;0.8659765124320984;0.32497912645339966
13;0.8697632551193237;0.30529671907424927;0.863215982913971;0.3369986414909363
14;0.8715922236442566;0.2986747920513153;0.8659765124320984;0.32238224148750305
15;0.8709710836410522;0.3001920282840729;0.8694272041320801;0.321183443069458
16;0.8723859190940857;0.2945903539657593;0.8712215423583984;0.3212905526161194
17;0.8749051094055176;0.2908305525779724;0.8645962476730347;0.3250887989997864
18;0.8778038620948792;0.2864832282066345;0.8234644532203674;0.48303911089897156
19;0.8769411444664001;0.28542381525039673;0.8708074688911438;0.3169412314891815
20;0.8804610371589661;0.28024160861968994;0.849965512752533;0.39843010902404785
21;0.8781489133834839;0.28220200538635254;0.8612836599349976;0.3716948926448822
22;0.8817033767700195;0.27458250522613525;0.8472049832344055;0.411455899477005
23;0.883980929851532;0.2739746570587158;0.8746721744537354;0.3054358959197998
24;0.8860514760017395;0.271692156791687;0.87508624792099;0.3121475279331207
25;0.88553386926651;0.26904797554016113;0.8687370419502258;0.3152245879173279
26;0.884809136390686;0.2700883746147156;0.8666666746139526;0.31928393244743347
27;0.8860859870910645;0.2665802836418152;0.8727397918701172;0.3247763514518738
28;0.8889502286911011;0.2633758783340454;0.8767426013946533;0.30023524165153503
29;0.8893988728523254;0.26145094633102417;0.8739820718765259;0.3125884532928467
30;0.8902270793914795;0.2608824670314789;0.832574188709259;0.38098570704460144
31;0.8919525146484375;0.2587989568710327;0.8659765124320984;0.316832959651947
32;0.8916764259338379;0.2593746483325958;0.7657694816589355;0.45220181345939636
33;0.8918489813804626;0.25461018085479736;0.8757764101028442;0.30459538102149963
34;0.8927807211875916;0.25418177247047424;0.8463768362998962;0.4315018951892853
35;0.8910897970199585;0.2552356421947479;0.857556939125061;0.33637452125549316
36;0.8919180035591125;0.2526947259902954;0.8817115426063538;0.29826080799102783
37;0.8954033851623535;0.24843774735927582;0.8335403800010681;0.38075608015060425
38;0.8965767025947571;0.24751915037631989;0.8799172043800354;0.29208967089653015
39;0.896611213684082;0.24727392196655273;0.8814354538917542;0.29507091641426086
40;0.8960936069488525;0.24469459056854248;0.8755003213882446;0.3007531464099884
41;0.8969908356666565;0.2457207590341568;0.868461012840271;0.3119807839393616
42;0.8989233374595642;0.23963260650634766;0.8738440275192261;0.31046658754348755
43;0.8981986045837402;0.24127444624900818;0.6242926120758057;0.5803734660148621
44;0.8988198041915894;0.24079173803329468;0.8857142925262451;0.2977270483970642
45;0.8997860550880432;0.23833023011684418;0.8788129687309265;0.300356924533844
46;0.9025812745094299;0.23413938283920288;0.8668047189712524;0.3487439751625061
47;0.9019946455955505;0.2343684434890747;0.877294659614563;0.2995116412639618
48;0.899233877658844;0.2375396341085434;0.8797791600227356;0.2922665476799011
49;0.9024432301521301;0.23203396797180176;0.8810213804244995;0.2945875823497772
0;0.7326592803001404;0.5453363656997681;0.7788819670677185;0.5356336236000061
1;0.7783145904541016;0.47759515047073364;0.7337474226951599;0.5276075601577759
2;0.7946718335151672;0.45239493250846863;0.7257418632507324;0.5711477398872375
3;0.8055076003074646;0.42740145325660706;0.8067632913589478;0.42946314811706543
4;0.8238318562507629;0.3939797282218933;0.8474810123443604;0.3790935277938843
5;0.8376009464263916;0.3703329563140869;0.850931704044342;0.3962211608886719
6;0.8452619314193726;0.3535895049571991;0.8520358800888062;0.3678889572620392
7;0.8520947098731995;0.34425318241119385;0.8091097474098206;0.44554924964904785
8;0.8554075360298157;0.33521559834480286;0.849965512752533;0.41317638754844666
9;0.8586168885231018;0.32869231700897217;0.8458247184753418;0.39755138754844666
10;0.859376072883606;0.32291802763938904;0.866252601146698;0.3482300639152527
11;0.8628614544868469;0.31614211201667786;0.8578329682350159;0.3569667637348175
12;0.8673821687698364;0.3114595115184784;0.8645962476730347;0.34795692563056946
13;0.8685899376869202;0.3046359121799469;0.8727397918701172;0.310366690158844
14;0.8724204301834106;0.30118656158447266;0.8731539249420166;0.3091353476047516
15;0.8728345632553101;0.2933851480484009;0.8738440275192261;0.305984228849411
16;0.8770791888237;0.2895578444004059;0.8739820718765259;0.3076082766056061
17;0.87701016664505;0.2891289293766022;0.8658385276794434;0.34491583704948425
18;0.8802884817123413;0.2822442054748535;0.861835777759552;0.3384484052658081
19;0.8797363638877869;0.2811153829097748;0.8695651888847351;0.3088192343711853
20;0.8820139169692993;0.27773717045783997;0.8763285279273987;0.30144017934799194
21;0.8816343545913696;0.27664074301719666;0.8277432918548584;0.38888344168663025
22;0.883980929851532;0.27201616764068604;0.878122866153717;0.3046088218688965
23;0.8832907676696777;0.2719212770462036;0.8853002190589905;0.2977195680141449
24;0.8868796825408936;0.26660990715026855;0.7914423942565918;0.47914281487464905
25;0.8874318599700928;0.26689085364341736;0.8840579986572266;0.29392656683921814
26;0.8910897970199585;0.2593827247619629;0.8741200566291809;0.31825655698776245
27;0.888156533241272;0.2594652473926544;0.8726018071174622;0.30915316939353943
28;0.8900890350341797;0.2575967609882355;0.8703933954238892;0.3265819549560547
29;0.8904341459274292;0.25851932168006897;0.7158039808273315;0.5131461024284363
30;0.891572892665863;0.2577953040599823;0.8822636008262634;0.2939528226852417
31;0.8922631144523621;0.2553359568119049;0.8833678364753723;0.2933315932750702
32;0.8910897970199585;0.25295695662498474;0.8621118068695068;0.41239485144615173
33;0.8946096897125244;0.2526960074901581;0.8571428656578064;0.38569632172584534
34;0.8962316513061523;0.2481282651424408;0.8782608509063721;0.30065131187438965
35;0.8981641530990601;0.24397480487823486;0.8109040856361389;0.46807536482810974
36;0.8976809978485107;0.24636729061603546;0.8790889978408813;0.2945285141468048
37;0.8995789885520935;0.24301642179489136;0.7734989523887634;0.45120128989219666
38;0.8956794738769531;0.2461898773908615;0.8756383657455444;0.3081423342227936
39;0.8970943689346313;0.24295596778392792;0.8770186305046082;0.29131537675857544
40;0.9004762172698975;0.23615778982639313;0.8817115426063538;0.29971814155578613
41;0.9010973572731018;0.24011588096618652;0.8880607485771179;0.28718438744544983
42;0.8995099663734436;0.23725533485412598;0.8795031309127808;0.3006240427494049
43;0.9008558392524719;0.235967755317688;0.8361628651618958;0.41017115116119385
44;0.9007523059844971;0.23780584335327148;0.8859903216362;0.28397470712661743
45;0.9017185568809509;0.23596897721290588;0.878122866153717;0.29451072216033936
46;0.9035475254058838;0.23274564743041992;0.8697032332420349;0.30362892150878906
47;0.9032369256019592;0.23015257716178894;0.8844720721244812;0.2834397852420807
48;0.9054455161094666;0.2264535129070282;0.8850241303443909;0.29243338108062744
49;0.9032714366912842;0.22995595633983612;0.8846100568771362;0.2898605167865753
0;0.7314859628677368;0.5484848618507385;0.6265010237693787;0.613851010799408
1;0.7763475775718689;0.47831475734710693;0.793512761592865;0.46365922689437866
2;0.7925322651863098;0.45061755180358887;0.7961352467536926;0.5009151101112366
3;0.8079922795295715;0.42430952191352844;0.8230503797531128;0.40031394362449646
4;0.8261439800262451;0.39236173033714294;0.8376811742782593;0.3820542097091675
5;0.8368072509765625;0.3692464828491211;0.8535541892051697;0.36582258343696594
6;0.8432949185371399;0.35826578736305237;0.8505175709724426;0.3557749092578888
7;0.8490234017372131;0.34693643450737;0.834782600402832;0.46918997168540955
8;0.8504382371902466;0.34403830766677856;0.8496894240379333;0.45481035113334656
9;0.8560287356376648;0.33139240741729736;0.8590752482414246;0.3385132849216461
10;0.8543722629547119;0.3293047547340393;0.854382336139679;0.37576472759246826
11;0.8603768348693848;0.3228433132171631;0.7878537178039551;0.45745137333869934
12;0.8595141172409058;0.3204262852668762;0.8594893217086792;0.34669041633605957
13;0.8648284673690796;0.3178940415382385;0.8679088950157166;0.3281046152114868
14;0.8664159178733826;0.30872106552124023;0.8534161448478699;0.3683198392391205
15;0.8641383051872253;0.3097172677516937;0.8578329682350159;0.3428363502025604
16;0.8704189658164978;0.3025112450122833;0.8654244542121887;0.3265184462070465
17;0.8686589598655701;0.30195754766464233;0.8691511154174805;0.3147246837615967
18;0.8712816834449768;0.2982310354709625;0.8683229684829712;0.31661462783813477
19;0.8726620078086853;0.296496719121933;0.8687370419502258;0.31706276535987854
20;0.8726965188980103;0.2939700484275818;0.8153209090232849;0.4024451673030853
21;0.8762164115905762;0.2892599105834961;0.7899240851402283;0.44922831654548645
22;0.8755607604980469;0.29180407524108887;0.8447204828262329;0.3566719889640808
23;0.880530059337616;0.28543561697006226;0.8670807480812073;0.33523231744766235
24;0.8776658177375793;0.28442299365997314;0.8789510130882263;0.3050302267074585
25;0.8807026147842407;0.28029218316078186;0.872877836227417;0.31262680888175964
26;0.8819448947906494;0.2774425446987152;0.8732919096946716;0.3061922490596771
27;0.8828076720237732;0.2746076285839081;0.8757764101028442;0.3055498003959656
28;0.8833252787590027;0.2756707966327667;0.877156674861908;0.309148907661438
29;0.8852232694625854;0.27075162529945374;0.8748102188110352;0.3071213662624359
30;0.8858098983764648;0.2688044011592865;0.8712215423583984;0.3235897421836853
31;0.8863275647163391;0.26642030477523804;0.8779848217964172;0.30281850695610046
32;0.8886741399765015;0.26289406418800354;0.8783988952636719;0.2970690429210663
33;0.8868106603622437;0.2660958468914032;0.8055210709571838;0.4105270802974701
34;0.891469419002533;0.2577098608016968;0.8763285279273987;0.30196642875671387
35;0.8902961015701294;0.2568607032299042;0.8724637627601624;0.305304616689682
36;0.8896749019622803;0.2595355808734894;0.8828157186508179;0.2927636206150055
37;0.890744686126709;0.25735849142074585;0.854382336139679;0.42855438590049744
38;0.891434907913208;0.25714564323425293;0.8828157186508179;0.29821309447288513
39;0.8964041471481323;0.24849027395248413;0.8673567771911621;0.3259440064430237
40;0.8939885497093201;0.24860741198062897;0.874948263168335;0.3033248484134674
41;0.8950928449630737;0.2488597184419632;0.877294659614563;0.31211480498313904
42;0.8958175182342529;0.24589106440544128;0.877294659614563;0.3066736161708832
43;0.8945061564445496;0.24584296345710754;0.881573498249054;0.30095556378364563
44;0.8974394202232361;0.24290122091770172;0.878122866153717;0.30055129528045654
45;0.8986817598342896;0.24313953518867493;0.8785369396209717;0.31110984086990356
46;0.8960245847702026;0.24500635266304016;0.8812974691390991;0.29901403188705444
47;0.8997515439987183;0.2379593700170517;0.8840579986572266;0.28891894221305847
48;0.8988888263702393;0.23905852437019348;0.8817115426063538;0.29449141025543213
49;0.899095892906189;0.23891834914684296;0.861007571220398;0.361685186624527
best_model_train_loss,best_model_val_loss,best_model_train_acc,best_model_val_acc
0.2379593700170517,0.2573946416378021,0.8997515439987183,0.8984126984126984
loss,accuracy,val_loss,val_accuracy
0.5484848618507385,0.7314859628677368,0.5013717412948608,0.7837129054520359
0.47831475734710693,0.7763475775718689,0.4636533558368683,0.8082815734989648
0.45061755180358887,0.7925322651863098,0.4770492911338806,0.8255348516218082
0.42430952191352844,0.8079922795295715,0.38739317655563354,0.8502415458937198
0.39236173033714294,0.8261439800262451,0.35525110363960266,0.8603174603174604
0.3692464828491211,0.8368072509765625,0.43128448724746704,0.8514837819185646
0.35826578736305237,0.8432949185371399,0.3348264694213867,0.8679089026915114
0.34693643450737,0.8490234017372131,0.38148730993270874,0.8589371980676328
0.34403830766677856,0.8504382371902466,0.388375461101532,0.8690131124913734
0.33139240741729736,0.8560287356376648,0.32629504799842834,0.8732919254658386
0.3293047547340393,0.8543722629547119,0.3383693993091583,0.8721877156659765
0.3228433132171631,0.8603768348693848,0.34747299551963806,0.8766045548654244
0.3204262852668762,0.8595141172409058,0.3125404715538025,0.8763285024154589
0.3178940415382385,0.8648284673690796,0.3380569517612457,0.8761904761904762
0.30872106552124023,0.8664159178733826,0.31904399394989014,0.8760524499654935
0.3097172677516937,0.8641383051872253,0.3178837299346924,0.8804692891649414
0.3025112450122833,0.8704189658164978,0.3038202226161957,0.8793650793650793
0.30195754766464233,0.8686589598655701,0.29948756098747253,0.8822636300897171
0.2982310354709625,0.8712816834449768,0.32906603813171387,0.8797791580400276
0.296496719121933,0.8726620078086853,0.28871119022369385,0.8822636300897171
0.2939700484275818,0.8726965188980103,0.3196193277835846,0.8861283643892339
0.2892599105834961,0.8762164115905762,0.35086047649383545,0.8790890269151139
0.29180407524108887,0.8755607604980469,0.33932313323020935,0.8826777087646653
0.28543561697006226,0.880530059337616,0.2971894145011902,0.8857142857142857
0.28442299365997314,0.8776658177375793,0.34410524368286133,0.8853002070393374
0.28029218316078186,0.8807026147842407,0.2810647487640381,0.8884748102139407
0.2774425446987152,0.8819448947906494,0.28392115235328674,0.8868184955141477
0.2746076285839081,0.8828076720237732,0.2799881100654602,0.8864044168391995
0.2756707966327667,0.8833252787590027,0.2943209707736969,0.8897170462387853
0.27075162529945374,0.8852232694625854,0.30873218178749084,0.8890269151138717
0.2688044011592865,0.8858098983764648,0.30818554759025574,0.8899930986887509
0.26642030477523804,0.8863275647163391,0.28331348299980164,0.8875086266390614
0.26289406418800354,0.8886741399765015,0.33651140332221985,0.8865424430641822
0.2660958468914032,0.8868106603622437,0.3073987662792206,0.8888888888888888
0.2577098608016968,0.891469419002533,0.2878410816192627,0.8888888888888888
0.2568607032299042,0.8902961015701294,0.30968427658081055,0.8854382332643203
0.2595355808734894,0.8896749019622803,0.266071617603302,0.8906832298136645
0.25735849142074585,0.890744686126709,0.3536393940448761,0.8825396825396825
0.25714564323425293,0.891434907913208,0.2691384553909302,0.8935817805383023
0.24849027395248413,0.8964041471481323,0.28999802470207214,0.893167701863354
0.24860741198062897,0.8939885497093201,0.26291021704673767,0.8909592822636301
0.2488597184419632,0.8950928449630737,0.26354315876960754,0.8930296756383713
0.24589106440544128,0.8958175182342529,0.27520275115966797,0.8895790200138026
0.24584296345710754,0.8945061564445496,0.34991729259490967,0.873567977915804
0.24290122091770172,0.8974394202232361,0.2614387273788452,0.8949620427881297
0.24313953518867493,0.8986817598342896,0.2658982574939728,0.8951000690131125
0.24500635266304016,0.8960245847702026,0.28968751430511475,0.8888888888888888
0.2379593700170517,0.8997515439987183,0.2573946416378021,0.8984126984126984
0.23905852437019348,0.8988888263702393,0.28036272525787354,0.8941338854382332
0.23891834914684296,0.899095892906189,0.28075653314590454,0.8927536231884058
INFO:root:Started the Logging
INFO:root:X training loaded.
INFO:root:(129, 500, 36223)
INFO:root:y training loaded.
INFO:root:(1, 36223)
INFO:root:Setting the shapes
INFO:root:(36223, 500, 129)
INFO:root:(36223, 1)
INFO:root:(36223, 129, 500)
INFO:root:Started running eegnet. If you want to run other methods please choose another model in the config.py file.
INFO:root:Parameters...
INFO:root:--------------- chans : 129
INFO:root:--------------- samples : 500
INFO:root:--------------- dropoutRate : 0.5
INFO:root:--------------- kernLength : 64
INFO:root:--------------- F1 : 32
INFO:root:--------------- D : 8
INFO:root:--------------- F2 : 512
INFO:root:--------------- norm_rate : 0.5
WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0162s vs `on_train_batch_end` time: 0.0267s). Check your callbacks.
INFO:root:Parameters...
INFO:root:--------------- chans : 129
INFO:root:--------------- samples : 500
INFO:root:--------------- dropoutRate : 0.5
INFO:root:--------------- kernLength : 64
INFO:root:--------------- F1 : 32
INFO:root:--------------- D : 8
INFO:root:--------------- F2 : 512
INFO:root:--------------- norm_rate : 0.5
INFO:root:Parameters...
INFO:root:--------------- chans : 129
INFO:root:--------------- samples : 500
INFO:root:--------------- dropoutRate : 0.5
INFO:root:--------------- kernLength : 64
INFO:root:--------------- F1 : 32
INFO:root:--------------- D : 8
INFO:root:--------------- F2 : 512
INFO:root:--------------- norm_rate : 0.5
WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0134s vs `on_train_batch_end` time: 0.0258s). Check your callbacks.
INFO:root:Parameters...
INFO:root:--------------- chans : 129
INFO:root:--------------- samples : 500
INFO:root:--------------- dropoutRate : 0.5
INFO:root:--------------- kernLength : 64
INFO:root:--------------- F1 : 32
INFO:root:--------------- D : 8
INFO:root:--------------- F2 : 512
INFO:root:--------------- norm_rate : 0.5
INFO:root:Parameters...
INFO:root:--------------- chans : 129
INFO:root:--------------- samples : 500
INFO:root:--------------- dropoutRate : 0.5
INFO:root:--------------- kernLength : 64
INFO:root:--------------- F1 : 32
INFO:root:--------------- D : 8
INFO:root:--------------- F2 : 512
INFO:root:--------------- norm_rate : 0.5
INFO:root:**********
INFO:root:--- Runtime: 10836.003910303116 seconds ---
INFO:root:Finished Logging
This diff is collapsed.
......@@ -68,12 +68,12 @@ def plot_loss_torch(loss, output_directory, model):
def cp_dir(source, target):
call(['cp', '-a', source, target])
def comparison_plot():
def comparison_plot_accuracy():
run_dir = './results/OHBM/'
print(run_dir)
plt.figure()
plt.title('Comparison of the Validation accuracy' )
plt.title('Comparison of the validation accuracy' )
plt.grid(True)
plt.xlabel('epochs')
plt.ylabel('accuracy (%)')
......@@ -81,14 +81,36 @@ def comparison_plot():
for experiment in os.listdir(run_dir):
name = experiment
print(name)
summary = pd.read_csv(run_dir+experiment+'/'+name+'_history.csv')
acc = 100 * summary['val_accuracy']
plt.plot(acc, '-' , label=name)
if(name != 'eegnet'):
summary = pd.read_csv(run_dir+experiment+'/'+name+'_history.csv')
acc = 100 * summary['val_accuracy']
plt.plot(acc, '-' , label=name)
plt.legend()
plt.savefig(run_dir+'/comparison_accuracy.png')
def comparison_plot_loss():
run_dir = './results/OHBM/'
print(run_dir)
plt.figure()
plt.title('Comparison of the validation loss')
plt.grid(True)
plt.xlabel('epochs')
plt.ylabel('loss')
for experiment in os.listdir(run_dir):
name = experiment
print(name)
if (name != 'eegnet'):
summary = pd.read_csv(run_dir + experiment + '/' + name + '_history.csv')
acc = summary['val_loss']
plt.plot(acc, '-', label=name)
plt.legend()
plt.savefig(run_dir + '/comparison_loss.png')
def select_best_model():
results = {}
model = {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment