From 626169a3b08d87a05358b8432038c993c95fb537 Mon Sep 17 00:00:00 2001 From: Angelos Chatzimparmpas Date: Thu, 15 Oct 2020 16:03:35 +0200 Subject: [PATCH] new --- __pycache__/run.cpython-38.pyc | Bin 108733 -> 109018 bytes frontend/src/components/Main.vue | 7 ++++--- run.py | 25 ++++++++++++++++++++----- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/__pycache__/run.cpython-38.pyc b/__pycache__/run.cpython-38.pyc index 57839a26bde3bbaca1cb9592bc63ec95bfd176b5..1971646e3fbb5611e959530720767ab664b8147e 100644 GIT binary patch delta 5611 zcmbVQdvH|c72k8S4-$bSn~+UHUL+x}O%}3AB@uxDNr;H12*mOd(M=btoz8%@sDpnXV;u~gK14+Ro#O}vG98DB9KdDSaPP4^;G!}a2lUy1S6DuPG8c!-w%}Z9DJuX@=HhTU zHrygs2%OBZ>Zt7sb8WydD*{mFtOsP}$W{wZ8~+~1-laaxrr=k3N38qAv3IHOuwvk{ zSQNJ|4rpcXQomv)0FK4ptroFT;KpL_R@>NA;7s;8j@g#yV`cAFyIC24BiUCVE7|uu zd%Cr+m(4Bj3ulFfnjNci zBh^}@!?*mO3~w85K$WmQMcOMeIX7UB`5L61=HExNcvObo2YcwfI&7#=DE5eliU2-_os4$N~5$fX(Eqzt3qL9|S>Y#SI zc>!PeBo)P4R=-b_tQD>q&_268Rr}?dm2{2v+?sVXUfK!T#oG_kmDnR|J<8tBRPD%} zJGJ%j0vC{oY0^#y&ZqTtE>#L$+McydvFvXT618h5yY^{MtTXV7CGr+&muLsp?R3v` zL8|rI2c0uwYu9fhfQ z4e-IuLv zZGV(1w4ZE$j2gAM5B1Vb+KUfuq}#O89UG}TrtSD7iT)LPVApnqu8X-JSwu81wqy?u zaC7Xlfu#zu*!+FJCVDcK{OH>YafYy#UCzn<@X^nnI0r@=S*0)ZjkBH9btIFw* z!0m{+usHBKObMPjNcKWM+I7m+_(U8~r zLCvhS#vv~O~d3dWFR{ z;9IN$K$){1kWE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z2)ksEpMRFJ1N)^(d<)o?H=k;vKSj3d`(cO4m^yZ$``D z)8V0^;Zz{4>S_LMGYX@P;Y?P`yv)b^EWm0)`BWjBSgov(L9u?JJh6V_T*gt%+7)Dt zp*&jYCSj@Ol@rdDm@Hv8VW-4o36~It#AFGV63&-6-zb_M3KYlySt69NI#%yAbquD* zQ$p{PN0e|`OI>`{6u9|kqp=a^`LZ$SR$k5G=XPL)@_Mg-tJhyNeC?lwd@NM5Y$nB| z)`{9nrPri32on-jxJ8(c1gtmdZ;r*({_3=U9I9-G#koF^QskZE&?&0*&HNWJc=(j@ zC{a$^3`J)9Fq^Ng!&j##;*0O7a!RC?wT6mFmGtoFeXC_tq$-O^m1gyI)=bY$##k$< zvZPOy!6e?l*=X^6MJ$Ean835B9u^%#L>WvWHYE|;*p0-Ku@v47Nxb!JEb(M4g*PgR z_XN9%coY+=Ovr@YOySl(RVHR{Q7^D@^l7^6E$WwSJn_RcaphIUkMXy2u-l48zI#6Qp^4|T)2VMT+$h5}8*a4W#u)BK!;O`W z$L7Rxa3{@i!^8OreTpyQr@q;k<91NbK1}raeRJH;Xg;$TG3HO03myhB(pGziHewz3AHa4=I^bD$=O@gQ#7BY&)!P?Oa<}MWpAT?X2hXr`s{7g&{Wb1 z(`9d?ex{0e>9V&`KT}OSxgs=WU3-qyhxKMpa~$I>`_RmP{X;mSJHzhYX>R9oQ)DFl zd&7m)3KX$oqb-niF+j2Es}mlpk~3ZntCqFWFIG0B$XZEPF^*#PE{8GiQNLqMeT9S_ z^h|1mrCKJ5tguvFg2d6hTs3AtF=#p~35ch^mN { @@ -447,9 +447,9 @@ export default Vue.extend({ .then(response => { this.PredictSel = response.data.PredictSel console.log('Server successfully sent the predictions!') - EventBus.$emit('emittedEventCallingGrid', this.storeBothEnsCM[0]) EventBus.$emit('SendSelectedPointsToServerEvent', this.PredictSel) + EventBus.$emit('LegendPredict') }) .catch(error => { console.log(error) @@ -494,6 +494,7 @@ export default Vue.extend({ console.log('Server successfully sent the predictions!') EventBus.$emit('emittedEventCallingGrid', this.storeBothEnsCM[1]) EventBus.$emit('SendSelectedPointsToServerEvent', this.PredictSelEnsem) + EventBus.$emit('LegendPredict') }) .catch(error => { console.log(error) diff --git a/run.py b/run.py index 62c7908..3f1ab60 100644 --- a/run.py +++ b/run.py @@ -1214,6 +1214,9 @@ def PreprocessingPredEnsemble(): yDataSortedFirst = [] yDataSortedLast = [] + ResultsGatheredFirst = [0,0,0,0,0,0,0] + ResultsGatheredLast = [0,0,0,0,0,0,0] + for index, item in enumerate(yData): if (item == 1): if (len(predictionsKNN[index]) != 0): @@ -1268,7 +1271,7 @@ def PreprocessingPredEnsemble(): predictionsGradB = ResultsGatheredFirst[5] + ResultsGatheredLast[5] yDataSorted = yDataSortedFirst + yDataSortedLast - return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions] + return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions, ResultsGatheredLast[6], ResultsGatheredFirst[6]] def PreprocessingParam(): dicKNN = allParametersPerformancePerModel[1] @@ -4082,6 +4085,9 @@ def PreprocessingPredCM(): yDataSortedFirst = [] yDataSortedLast = [] + ResultsGatheredFirst = [0,0,0,0,0,0,0] + ResultsGatheredLast = [0,0,0,0,0,0,0] + for index, item in enumerate(yData): if (item == 1): if (len(predictionsKNN[index]) != 0): @@ -4135,7 +4141,7 @@ def PreprocessingPredCM(): predictionsGradB = ResultsGatheredFirst[5] + ResultsGatheredLast[5] yDataSorted = yDataSortedFirst + yDataSortedLast - return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions] + return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions, ResultsGatheredLast[6], ResultsGatheredFirst[6]] def PreprocessingPredCMSecond(): dicKNNCC = allParametersPerfCrossMutr[3] @@ -4241,6 +4247,9 @@ def PreprocessingPredCMSecond(): yDataSortedFirst = [] yDataSortedLast = [] + ResultsGatheredFirst = [0,0,0,0,0,0,0] + ResultsGatheredLast = [0,0,0,0,0,0,0] + for index, item in enumerate(yData): if (item == 1): if (len(predictionsKNN[index]) != 0): @@ -4294,7 +4303,7 @@ def PreprocessingPredCMSecond(): predictionsGradB = ResultsGatheredFirst[5] + ResultsGatheredLast[5] yDataSorted = yDataSortedFirst + yDataSortedLast - return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions] + return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions, ResultsGatheredLast[6], ResultsGatheredFirst[6]] def PreprocessingParamCM(): dicKNNC = allParametersPerfCrossMutr[1] @@ -4903,6 +4912,9 @@ def PreprocessingPredSel(SelectedIDs): yDataSortedFirst = [] yDataSortedLast = [] + ResultsGatheredFirst = [0,0,0,0,0,0,0] + ResultsGatheredLast = [0,0,0,0,0,0,0] + for index, item in enumerate(yData): if (item == 1): if (len(predictionsKNN[index]) != 0): @@ -4956,7 +4968,7 @@ def PreprocessingPredSel(SelectedIDs): predictionsGradB = ResultsGatheredFirst[5] + ResultsGatheredLast[5] yDataSorted = yDataSortedFirst + yDataSortedLast - return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions] + return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions, ResultsGatheredLast[6], ResultsGatheredFirst[6]] @cross_origin(origin='localhost',headers=['Content-Type','Authorization']) @app.route('/data/SendtoSeverSelIDs', methods=["GET", "POST"]) @@ -5076,6 +5088,9 @@ def PreprocessingPredSelEnsem(SelectedIDsEnsem): yDataSortedFirst = [] yDataSortedLast = [] + ResultsGatheredFirst = [0,0,0,0,0,0,0] + ResultsGatheredLast = [0,0,0,0,0,0,0] + for index, item in enumerate(yData): if (item == 1): if (len(predictionsKNN[index]) != 0): @@ -5130,7 +5145,7 @@ def PreprocessingPredSelEnsem(SelectedIDsEnsem): predictionsGradB = ResultsGatheredFirst[5] + ResultsGatheredLast[5] yDataSorted = yDataSortedFirst + yDataSortedLast - return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions] + return [predictionsKNN, predictionsLR, predictionsMLP, predictionsRF, predictionsGradB, predictions, ResultsGatheredLast[6], ResultsGatheredFirst[6]] @cross_origin(origin='localhost',headers=['Content-Type','Authorization']) @app.route('/data/SendtoSeverSelIDsEnsem', methods=["GET", "POST"])