From b070bb3bc28312c2d2f0100ec3550190ec721c06 Mon Sep 17 00:00:00 2001 From: Angelos Chatzimparmpas Date: Tue, 19 Jan 2021 14:37:47 +0100 Subject: [PATCH] new --- __pycache__/run.cpython-38.pyc | Bin 31434 -> 35350 bytes .../src/components/FeatureSpaceDetail.vue | 385 +++++++++++++++++- .../src/components/FeatureSpaceOverview.vue | 94 +++-- run.py | 214 ++++++++-- 4 files changed, 639 insertions(+), 54 deletions(-) diff --git a/__pycache__/run.cpython-38.pyc b/__pycache__/run.cpython-38.pyc index a912c27016ca4822552a077d8438cf790f7ecd47..5e0db92708ad9dc83a7cfbfae9ffe8443dc448bc 100644 GIT binary patch delta 9487 zcma)C3v?XSd7eA_&`SG|w31g^y)5g!vR>B1@xWYDm2+J6=u`O1b(Q4(@?C#x> zEsI&!APgkbV7Lh-gudzS2FqaG3z{aw`DkAq#}|>xAlLR2OICx@l@E zu8ZMr-4tFEMd;E+8DjF(8eNQb!_xy#?}f^|-w^8%$_z1Q{(a^uk?v!U<@@XzV_YJ8 zBR@52*dUcirP2z?Bb9+Q4N`fa5uPTsIn|;G^CUquB6+=nRB=?KAFIB}*2&eWws|2T zs_m%`sdAnWfrqLvq}-ooS05G65W0z7ENI_Yli{r7oPji_mU9%Y*`1}iD#Nd1P4?Bv zdap1?G^)I1)U5Vtra7`rINWwf zOjr_DbuE@(MrU1?&YPgK4s@E-^>YFdq(&H*rad})%f6+Nwqbv^BXl5iB6K0FLFh*4 zVNS;r*0mVyXD>J!lIt+o2jF*00W~lj4UEY{k&vRscWjH(^_aT>VI#r-LNCIX5H=xf z2Jjb-hr+5%w}HZ7NC|}LmoaNA!WIOaUVb~3_oT;VHd(~ggpp**>{|q$ZhO>=R7&cPPum5jd_K6H?x0n zjgl(1rEnXGUN}{FAE_V4^!*680O*eCXgCs(WC?AjRhWJ&>nv`sK#{XVCo=$6$O_6T z<-#|!W5u+EB9q7C7@E#RZ^qDZfIe6tbcPkV*VbeVIxFg8N0&|_*#(&7j;%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0p22r`^pA(hmYKjo_LM|%9<0tJH`8VTR&YfcEk5NDV^TQMJ9fN7`E!4x00L}w+ zz$ifO#fzZc1pE~6Jm6;l8I6(hc@Ivj7oY)T95z6~-1red7%)IkciZNY2FtUW-m(uz mj5WleB%Txf=MR_Vdk*?po`=49o?K9#1D>>ULj3%E%l`u(DFoC2 diff --git a/frontend/src/components/FeatureSpaceDetail.vue b/frontend/src/components/FeatureSpaceDetail.vue index d7a430b..aa9f083 100644 --- a/frontend/src/components/FeatureSpaceDetail.vue +++ b/frontend/src/components/FeatureSpaceDetail.vue @@ -107,7 +107,7 @@ export default { this.graphVizualization() }, computeOnce () { - var numberOfTransformations = 4 // change that + var numberOfTransformations = 12 // change that var listofNodes = this.dataFS[34] var dataLocOnce = [] @@ -125,6 +125,7 @@ export default { var outcome var countLoc var pushEachFinalFinal = [] + for (let loop=1; loop<=5; loop++) { var corrMatrixCombLoc =[] var corrMatrixCombTotalLoc = [] @@ -178,7 +179,7 @@ export default { newVal = newVal / listofNodes.length outcome = oldVal - newVal pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+1], valueIns: outcome}) - + console.log(pushEach) var transf3 = element.transf3 corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf3[10+quadrantNumberLocal]))[0] * 100) MIRemainingLoc.push(JSON.parse(transf3[20+quadrantNumberLocal])) @@ -222,6 +223,190 @@ export default { newVal = newVal / listofNodes.length outcome = oldVal - newVal pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+3], valueIns: outcome}) + + var transf5 = element.transf5 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf5[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf5[20+quadrantNumberLocal])) + transf5 = JSON.parse(transf5[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf5).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+4], valueIns: outcome}) + + + var transf6 = element.transf6 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf6[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf6[20+quadrantNumberLocal])) + transf6 = JSON.parse(transf6[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf6).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+5], valueIns: outcome}) + + + var transf7 = element.transf7 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf7[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf7[20+quadrantNumberLocal])) + transf7 = JSON.parse(transf7[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf7).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+6], valueIns: outcome}) + + + var transf8 = element.transf8 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf8[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf8[20+quadrantNumberLocal])) + transf8 = JSON.parse(transf8[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf8).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+7], valueIns: outcome}) + + + var transf9 = element.transf9 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf9[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf9[20+quadrantNumberLocal])) + transf9 = JSON.parse(transf9[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf9).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+8], valueIns: outcome}) + + + var transf10 = element.transf10 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf10[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf10[20+quadrantNumberLocal])) + transf10 = JSON.parse(transf10[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf10).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+9], valueIns: outcome}) + + + var transf11 = element.transf11 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf11[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf11[20+quadrantNumberLocal])) + transf11 = JSON.parse(transf11[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf11).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+10], valueIns: outcome}) + + + var transf12 = element.transf12 + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf12[10+quadrantNumberLocal]))[0] * 100) + MIRemainingLoc.push(JSON.parse(transf12[20+quadrantNumberLocal])) + transf12 = JSON.parse(transf12[loop-1]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf12).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var retrieveData = dataLocOnce[loop-1] + var search = Object.values(retrieveData[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+11], valueIns: outcome}) + pushEachFinal.push({key: listofNodes[index], value: pushEach}) }) pushEachFinalFinal.push(pushEachFinal) @@ -235,7 +420,7 @@ export default { }, initializeNetwork () { - var numberOfTransformations = 4 // change that + var numberOfTransformations = 12 // change that var featureNames = JSON.parse(this.dataFS[35]) @@ -356,8 +541,192 @@ export default { newVal = newVal / listofNodes.length outcome = oldVal - newVal pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+3], valueIns: outcome}) - pushEachFinal.push({key: listofNodes[index], value: pushEach}) + + var transf5 = element.transf5 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf5[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf5[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf5[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf5[20+quadrantNumberLocal])) + transf5 = JSON.parse(transf5[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf5).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+4], valueIns: outcome}) + + var transf6 = element.transf6 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf6[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf6[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf6[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf6[20+quadrantNumberLocal])) + transf6 = JSON.parse(transf6[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf6).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+5], valueIns: outcome}) + + var transf7 = element.transf7 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf7[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf7[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf7[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf7[20+quadrantNumberLocal])) + transf7 = JSON.parse(transf7[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf7).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+6], valueIns: outcome}) + + var transf8 = element.transf8 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf8[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf8[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf8[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf8[20+quadrantNumberLocal])) + transf8 = JSON.parse(transf8[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf8).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+7], valueIns: outcome}) + + var transf9 = element.transf9 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf9[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf9[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf9[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf9[20+quadrantNumberLocal])) + transf9 = JSON.parse(transf9[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf9).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+8], valueIns: outcome}) + + var transf10 = element.transf10 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf10[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf10[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf10[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf10[20+quadrantNumberLocal])) + transf10 = JSON.parse(transf10[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf10).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+9], valueIns: outcome}) + + var transf11 = element.transf11 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf11[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf11[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf11[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf11[20+quadrantNumberLocal])) + transf11 = JSON.parse(transf11[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf11).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ + }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+10], valueIns: outcome}) + + var transf12 = element.transf12 + corrMatrixCombLoc.push(Object.values(JSON.parse(transf12[5+quadrantNumberLocal]))) + corrMatrixCombTotalLoc.push(Object.values(JSON.parse(transf12[10+quadrantNumberLocal]))[0] * 100) + VIFRemainingLoc.push(Object.values(JSON.parse(transf12[15+quadrantNumberLocal]))[0]) + MIRemainingLoc.push(JSON.parse(transf12[20+quadrantNumberLocal])) + transf12 = JSON.parse(transf12[quadrantNumberLocal]) + oldVal = 0 + newVal = 0 + outcome = 0 + countLoc = 0 + Object.entries(transf12).forEach( + function ([feature, value]) { + var key = listofNodes[index] + var search = Object.values(dataLoc[key]) + oldVal = Math.abs(search[countLoc]) + oldVal + newVal = Math.abs(Object.values(value)[0]) + newVal + countLoc++ }) + oldVal = oldVal / listofNodes.length + newVal = newVal / listofNodes.length + outcome = oldVal - newVal + pushEach.push({keyIns: featureNames[(index)*numberOfTransformations+11], valueIns: outcome}) + pushEachFinal.push({key: listofNodes[index], value: pushEach}) + }) this.corrMatrixComb = [...corrMatrixCombLoc] this.corrMatrixCombTotal = [...corrMatrixCombTotalLoc] @@ -394,6 +763,14 @@ export default { {"name": featureNames[(featureNumber)*numberOfTransformations+1], "group": groupID, "active": false}, {"name": featureNames[(featureNumber)*numberOfTransformations+2], "group": groupID, "active": false}, {"name": featureNames[(featureNumber)*numberOfTransformations+3], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+4], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+5], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+6], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+7], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+8], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+9], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+10], "group": groupID, "active": false}, + {"name": featureNames[(featureNumber)*numberOfTransformations+11], "group": groupID, "active": false}, ) featureNumber++ }) diff --git a/frontend/src/components/FeatureSpaceOverview.vue b/frontend/src/components/FeatureSpaceOverview.vue index 5d36cf6..1719ac4 100644 --- a/frontend/src/components/FeatureSpaceOverview.vue +++ b/frontend/src/components/FeatureSpaceOverview.vue @@ -96,7 +96,7 @@ export default { svg.selectAll("*").remove(); var features = this.colorsReceive - + console.log(features) var activeLeafLoc = this.activeLeaf var listofNodes = this.overallData[34] @@ -184,56 +184,96 @@ export default { for (let i = 0; i < features[4].length; i++) { featuresQuad1.push({"name": features[0][i].key, "children": [ - {"name": features[0][i].value[0].keyIns, "lin_color": features[0][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+0]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+0])}, - {"name": features[0][i].value[1].keyIns, "lin_color": features[0][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+1]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+1])}, - {"name": features[0][i].value[2].keyIns, "lin_color": features[0][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+2]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+2])}, - {"name": features[0][i].value[3].keyIns, "lin_color": features[0][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*4+3]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+3])}, + {"name": features[0][i].value[0].keyIns, "lin_color": features[0][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+0]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+0])}, + {"name": features[0][i].value[1].keyIns, "lin_color": features[0][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+1]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+1])}, + {"name": features[0][i].value[2].keyIns, "lin_color": features[0][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+2]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+2])}, + {"name": features[0][i].value[3].keyIns, "lin_color": features[0][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+3]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+3])}, + {"name": features[0][i].value[4].keyIns, "lin_color": features[0][i].value[4].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+4]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+4])}, + {"name": features[0][i].value[5].keyIns, "lin_color": features[0][i].value[5].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+5]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+5])}, + {"name": features[0][i].value[6].keyIns, "lin_color": features[0][i].value[6].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+6]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+6])}, + {"name": features[0][i].value[7].keyIns, "lin_color": features[0][i].value[7].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+7]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+7])}, + {"name": features[0][i].value[8].keyIns, "lin_color": features[0][i].value[8].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+8]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+8])}, + {"name": features[0][i].value[9].keyIns, "lin_color": features[0][i].value[9].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+9]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+9])}, + {"name": features[0][i].value[10].keyIns, "lin_color": features[0][i].value[10].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+10]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+10])}, + {"name": features[0][i].value[11].keyIns, "lin_color": features[0][i].value[11].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[0][i*12+11]), "MI_pick":colorsScaleNodes1(MIVar1[i*features[4].length+11])}, ], - "lin_color": features[0][i].value[0].valueIns+features[0][i].value[1].valueIns+features[0][i].value[2].valueIns+features[0][i].value[3].valueIns, + "lin_color": features[0][i].value[0].valueIns+features[0][i].value[1].valueIns+features[0][i].value[2].valueIns+features[0][i].value[3].valueIns+features[0][i].value[4].valueIns+features[0][i].value[5].valueIns+features[0][i].value[6].valueIns+features[0][i].value[7].valueIns+features[0][i].value[8].valueIns+features[0][i].value[9].valueIns+features[0][i].value[10].valueIns+features[0][i].value[11].valueIns, "Corr_pick": Math.round(Object.values(corrGlob1)[i+1]['0'] * 100), "MI_pick": colorsScaleNodes1(MIVar1[i]) }) featuresQuad2.push({"name": features[1][i].key, "children": [ - {"name": features[1][i].value[0].keyIns, "lin_color": features[1][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+0]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+0])}, - {"name": features[1][i].value[1].keyIns, "lin_color": features[1][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+1]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+1])}, - {"name": features[1][i].value[2].keyIns, "lin_color": features[1][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+2]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+2])}, - {"name": features[1][i].value[3].keyIns, "lin_color": features[1][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*4+3]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+3])}, + {"name": features[1][i].value[0].keyIns, "lin_color": features[1][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+0]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+0])}, + {"name": features[1][i].value[1].keyIns, "lin_color": features[1][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+1]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+1])}, + {"name": features[1][i].value[2].keyIns, "lin_color": features[1][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+2]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+2])}, + {"name": features[1][i].value[3].keyIns, "lin_color": features[1][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+3]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+3])}, + {"name": features[1][i].value[4].keyIns, "lin_color": features[1][i].value[4].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+4]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+4])}, + {"name": features[1][i].value[5].keyIns, "lin_color": features[1][i].value[5].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+5]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+5])}, + {"name": features[1][i].value[6].keyIns, "lin_color": features[1][i].value[6].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+6]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+6])}, + {"name": features[1][i].value[7].keyIns, "lin_color": features[1][i].value[7].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+7]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+7])}, + {"name": features[1][i].value[8].keyIns, "lin_color": features[1][i].value[8].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+8]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+8])}, + {"name": features[1][i].value[9].keyIns, "lin_color": features[1][i].value[9].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+9]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+9])}, + {"name": features[1][i].value[10].keyIns, "lin_color": features[1][i].value[10].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+10]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+10])}, + {"name": features[1][i].value[11].keyIns, "lin_color": features[1][i].value[11].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[1][i*12+11]), "MI_pick":colorsScaleNodes2(MIVar2[i*features[4].length+11])}, ], - "lin_color": features[1][i].value[0].valueIns+features[1][i].value[1].valueIns+features[1][i].value[2].valueIns+features[1][i].value[3].valueIns, + "lin_color": features[1][i].value[0].valueIns+features[1][i].value[1].valueIns+features[1][i].value[2].valueIns+features[1][i].value[3].valueIns+features[1][i].value[4].valueIns+features[1][i].value[5].valueIns+features[1][i].value[6].valueIns+features[1][i].value[7].valueIns+features[1][i].value[8].valueIns+features[1][i].value[9].valueIns+features[1][i].value[10].valueIns+features[1][i].value[11].valueIns, "Corr_pick": Math.round(Object.values(corrGlob2)[i+1]['0'] * 100), "MI_pick": colorsScaleNodes2(MIVar2[i]) }) featuresQuad3.push({"name": features[2][i].key, "children": [ - {"name": features[2][i].value[0].keyIns, "lin_color": features[2][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+0]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+0])}, - {"name": features[2][i].value[1].keyIns, "lin_color": features[2][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+1]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+1])}, - {"name": features[2][i].value[2].keyIns, "lin_color": features[2][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+2]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+2])}, - {"name": features[2][i].value[3].keyIns, "lin_color": features[2][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*4+3]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+3])}, + {"name": features[2][i].value[0].keyIns, "lin_color": features[2][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+0]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+0])}, + {"name": features[2][i].value[1].keyIns, "lin_color": features[2][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+1]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+1])}, + {"name": features[2][i].value[2].keyIns, "lin_color": features[2][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+2]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+2])}, + {"name": features[2][i].value[3].keyIns, "lin_color": features[2][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+3]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+3])}, + {"name": features[2][i].value[4].keyIns, "lin_color": features[2][i].value[4].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+4]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+4])}, + {"name": features[2][i].value[5].keyIns, "lin_color": features[2][i].value[5].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+5]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+5])}, + {"name": features[2][i].value[6].keyIns, "lin_color": features[2][i].value[6].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+6]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+6])}, + {"name": features[2][i].value[7].keyIns, "lin_color": features[2][i].value[7].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+7]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+7])}, + {"name": features[2][i].value[8].keyIns, "lin_color": features[2][i].value[8].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+8]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+8])}, + {"name": features[2][i].value[9].keyIns, "lin_color": features[2][i].value[9].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+9]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+9])}, + {"name": features[2][i].value[10].keyIns, "lin_color": features[2][i].value[10].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+10]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+10])}, + {"name": features[2][i].value[11].keyIns, "lin_color": features[2][i].value[11].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[2][i*12+11]), "MI_pick":colorsScaleNodes3(MIVar3[i*features[4].length+11])}, ], - "lin_color": features[2][i].value[0].valueIns+features[2][i].value[1].valueIns+features[2][i].value[2].valueIns+features[2][i].value[3].valueIns, + "lin_color": features[2][i].value[0].valueIns+features[2][i].value[1].valueIns+features[2][i].value[2].valueIns+features[2][i].value[3].valueIns+features[2][i].value[4].valueIns+features[2][i].value[5].valueIns+features[2][i].value[6].valueIns+features[2][i].value[7].valueIns+features[2][i].value[8].valueIns+features[2][i].value[9].valueIns+features[2][i].value[10].valueIns+features[2][i].value[11].valueIns, "Corr_pick": Math.round(Object.values(corrGlob3)[i+1]['0'] * 100), "MI_pick": colorsScaleNodes3(MIVar3[i]) }) featuresQuad4.push({"name": features[3][i].key, "children": [ - {"name": features[3][i].value[0].keyIns, "lin_color": features[3][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+0]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+0])}, - {"name": features[3][i].value[1].keyIns, "lin_color": features[3][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+1]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+1])}, - {"name": features[3][i].value[2].keyIns, "lin_color": features[3][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+2]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+2])}, - {"name": features[3][i].value[3].keyIns, "lin_color": features[3][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*4+3]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+3])}, + {"name": features[3][i].value[0].keyIns, "lin_color": features[3][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+0]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+0])}, + {"name": features[3][i].value[1].keyIns, "lin_color": features[3][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+1]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+1])}, + {"name": features[3][i].value[2].keyIns, "lin_color": features[3][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+2]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+2])}, + {"name": features[3][i].value[3].keyIns, "lin_color": features[3][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+3]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+3])}, + {"name": features[3][i].value[4].keyIns, "lin_color": features[3][i].value[4].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+4]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+4])}, + {"name": features[3][i].value[5].keyIns, "lin_color": features[3][i].value[5].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+5]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+5])}, + {"name": features[3][i].value[6].keyIns, "lin_color": features[3][i].value[6].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+6]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+6])}, + {"name": features[3][i].value[7].keyIns, "lin_color": features[3][i].value[7].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+7]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+7])}, + {"name": features[3][i].value[8].keyIns, "lin_color": features[3][i].value[8].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+8]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+8])}, + {"name": features[3][i].value[9].keyIns, "lin_color": features[3][i].value[9].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+9]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+9])}, + {"name": features[3][i].value[10].keyIns, "lin_color": features[3][i].value[10].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+10]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+10])}, + {"name": features[3][i].value[11].keyIns, "lin_color": features[3][i].value[11].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[3][i*12+11]), "MI_pick":colorsScaleNodes4(MIVar4[i*features[4].length+11])}, ], - "lin_color": features[3][i].value[0].valueIns+features[3][i].value[1].valueIns+features[3][i].value[2].valueIns+features[3][i].value[3].valueIns, + "lin_color": features[3][i].value[0].valueIns+features[3][i].value[1].valueIns+features[3][i].value[2].valueIns+features[3][i].value[3].valueIns+features[3][i].value[4].valueIns+features[3][i].value[5].valueIns+features[3][i].value[6].valueIns+features[3][i].value[7].valueIns+features[3][i].value[8].valueIns+features[3][i].value[9].valueIns+features[3][i].value[10].valueIns+features[3][i].value[11].valueIns, "Corr_pick": Math.round(Object.values(corrGlob4)[i+1]['0'] * 100), "MI_pick": colorsScaleNodes4(MIVar4[i]) }) featuresQuad5.push({"name": features[4][i].key, "children": [ - {"name": features[4][i].value[0].keyIns, "lin_color": features[4][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+0]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+0])}, - {"name": features[4][i].value[1].keyIns, "lin_color": features[4][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+1]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+1])}, - {"name": features[4][i].value[2].keyIns, "lin_color": features[4][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+2]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+2])}, - {"name": features[4][i].value[3].keyIns, "lin_color": features[4][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*4+3]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+3])}, + {"name": features[4][i].value[0].keyIns, "lin_color": features[4][i].value[0].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+0]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+0])}, + {"name": features[4][i].value[1].keyIns, "lin_color": features[4][i].value[1].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+1]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+1])}, + {"name": features[4][i].value[2].keyIns, "lin_color": features[4][i].value[2].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+2]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+2])}, + {"name": features[4][i].value[3].keyIns, "lin_color": features[4][i].value[3].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+3]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+3])}, + {"name": features[4][i].value[4].keyIns, "lin_color": features[4][i].value[4].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+4]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+4])}, + {"name": features[4][i].value[5].keyIns, "lin_color": features[4][i].value[5].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+5]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+5])}, + {"name": features[4][i].value[6].keyIns, "lin_color": features[4][i].value[6].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+6]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+6])}, + {"name": features[4][i].value[7].keyIns, "lin_color": features[4][i].value[7].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+7]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+7])}, + {"name": features[4][i].value[8].keyIns, "lin_color": features[4][i].value[8].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+8]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+8])}, + {"name": features[4][i].value[9].keyIns, "lin_color": features[4][i].value[9].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+9]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+9])}, + {"name": features[4][i].value[10].keyIns, "lin_color": features[4][i].value[10].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+10]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+10])}, + {"name": features[4][i].value[11].keyIns, "lin_color": features[4][i].value[11].valueIns, "Corr_pick": Math.round(this.overallDataTransfCorr[4][i*12+11]), "MI_pick":colorsScaleNodes5(MIVar5[i*features[4].length+11])}, ], - "lin_color": features[4][i].value[0].valueIns+features[4][i].value[1].valueIns+features[4][i].value[2].valueIns+features[4][i].value[3].valueIns, + "lin_color": features[4][i].value[0].valueIns+features[4][i].value[1].valueIns+features[4][i].value[2].valueIns+features[4][i].value[3].valueIns+features[4][i].value[4].valueIns+features[4][i].value[5].valueIns+features[4][i].value[6].valueIns+features[4][i].value[7].valueIns+features[4][i].value[8].valueIns+features[4][i].value[9].valueIns+features[4][i].value[10].valueIns+features[4][i].value[11].valueIns, "Corr_pick": Math.round(Object.values(corrGlob5)[i+1]['0'] * 100), "MI_pick": colorsScaleNodes5(MIVar5[i]) }) @@ -302,7 +342,7 @@ export default { // current pan, zoom, and rotation var curX = width / 2; var curY = height / 2; - var curZ = 1.22; // current zoom + var curZ = 1.18; // current zoom var curR = 270; // current rotation // keyboard key codes diff --git a/run.py b/run.py index 462766b..aa1896f 100644 --- a/run.py +++ b/run.py @@ -134,7 +134,7 @@ def reset(): columnsNames = [] global listofTransformations - listofTransformations = ["r","rE","r2","r10"] + listofTransformations = ["r","b","zs","mms","l2","l1p","l10","e2","em1","p2","p3","p4"] return 'The reset was done!' @@ -248,7 +248,7 @@ def retrieveFileName(): columnsNames = [] global listofTransformations - listofTransformations = ["r","rE","r2","r10"] + listofTransformations = ["r","b","zs","mms","l2","l1p","l10","e2","em1","p2","p3","p4"] DataRawLength = -1 DataRawLengthTest = -1 @@ -531,17 +531,38 @@ def executeModel(exeCall, flagEx, nodeTransfName): else: if (splittedCol[1] == 'r'): XData[nodeTransfName] = XData[nodeTransfName].round() - elif (splittedCol[1] == 'rE'): - XData[nodeTransfName] = np.log(XData[nodeTransfName]) - XData[nodeTransfName] = XData[nodeTransfName].round() - elif (splittedCol[1] == 'r2'): + elif (splittedCol[1] == 'b'): + number_of_bins = np.histogram_bin_edges(XData[nodeTransfName], bins='auto') + emptyLabels = [] + for index, number in enumerate(number_of_bins): + if (index == 0): + pass + else: + emptyLabels.append(index) + XData[nodeTransfName] = pd.cut(XData[nodeTransfName], bins=number_of_bins, labels=emptyLabels, include_lowest=True, right=True) + XData[nodeTransfName] = pd.to_numeric(XData[nodeTransfName], downcast='signed') + elif (splittedCol[1] == 'zs'): + XData[nodeTransfName] = (XData[nodeTransfName]-XData[nodeTransfName].mean())/XData[nodeTransfName].std() + elif (splittedCol[1] == 'mms'): + XData[nodeTransfName] = (XData[nodeTransfName]-XData[nodeTransfName].min())/(XData[nodeTransfName].max()-XData[nodeTransfName].min()) + elif (splittedCol[1] == 'l2'): XData[nodeTransfName] = np.log2(XData[nodeTransfName]) - XData[nodeTransfName] = XData[nodeTransfName].round() - else: + elif (splittedCol[1] == 'l1p'): + XData[nodeTransfName] = np.log1p(XData[nodeTransfName]) + elif (splittedCol[1] == 'l10'): XData[nodeTransfName] = np.log10(XData[nodeTransfName]) - XData[nodeTransfName] = XData[nodeTransfName].round() - XDataStored = XData.copy() - print(XData) + elif (splittedCol[1] == 'e2'): + XData[nodeTransfName] = np.exp2(XData[nodeTransfName]) + elif (splittedCol[1] == 'em1'): + XData[nodeTransfName] = np.expm1(XData[nodeTransfName]) + elif (splittedCol[1] == 'p2'): + XData[nodeTransfName] = np.power(XData[nodeTransfName], 2) + elif (splittedCol[1] == 'p3'): + XData[nodeTransfName] = np.power(XData[nodeTransfName], 3) + else: + XData[nodeTransfName] = np.power(XData[nodeTransfName], 4) + XDataStored = XData.copy() + columnsNamesLoc = XData.columns.values.tolist() for col in columnsNamesLoc: @@ -744,7 +765,6 @@ def Transformation(quadrant1, quadrant2, quadrant3, quadrant4, quadrant5): splittedCol = columnsNames[(count)*len(listofTransformations)+0].split('_') if(len(splittedCol) == 1): - d={} XDataNumericCopy = XDataNumeric.copy() for number in range(1,6): @@ -773,14 +793,21 @@ def Transformation(quadrant1, quadrant2, quadrant3, quadrant4, quadrant5): else: d={} XDataNumericCopy = XDataNumeric.copy() - XDataNumericCopy[i] = np.log(XDataNumericCopy[i]) - XDataNumericCopy[i] = XDataNumericCopy[i].round() + number_of_bins = np.histogram_bin_edges(XDataNumericCopy[i], bins='auto') + emptyLabels = [] + for index, number in enumerate(number_of_bins): + if (index == 0): + pass + else: + emptyLabels.append(index) + XDataNumericCopy[i] = pd.cut(XDataNumericCopy[i], bins=number_of_bins, labels=emptyLabels, include_lowest=True, right=True) + XDataNumericCopy[i] = pd.to_numeric(XDataNumericCopy[i], downcast='signed') for number in range(1,6): quadrantVariable = str('quadrant%s' % number) illusion = locals()[quadrantVariable] d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] - dicTransf["transf2"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) - splittedCol = columnsNames[(count)*len(listofTransformations)+2].split('_') + dicTransf["transf2"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+2].split('_') if(len(splittedCol) == 1): d={} XDataNumericCopy = XDataNumeric.copy() @@ -792,14 +819,13 @@ def Transformation(quadrant1, quadrant2, quadrant3, quadrant4, quadrant5): else: d={} XDataNumericCopy = XDataNumeric.copy() - XDataNumericCopy[i] = np.log2(XDataNumericCopy[i]) - XDataNumericCopy[i] = XDataNumericCopy[i].round() + XDataNumericCopy[i] = (XDataNumericCopy[i]-XDataNumericCopy[i].mean())/XDataNumericCopy[i].std() for number in range(1,6): quadrantVariable = str('quadrant%s' % number) illusion = locals()[quadrantVariable] d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] - dicTransf["transf3"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) - splittedCol = columnsNames[(count)*len(listofTransformations)+3].split('_') + dicTransf["transf3"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+3].split('_') if(len(splittedCol) == 1): d={} XDataNumericCopy = XDataNumeric.copy() @@ -808,16 +834,159 @@ def Transformation(quadrant1, quadrant2, quadrant3, quadrant4, quadrant5): illusion = locals()[quadrantVariable] d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] dicTransf["transf4"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = (XDataNumericCopy[i]-XDataNumericCopy[i].min())/(XDataNumericCopy[i].max()-XDataNumericCopy[i].min()) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf4"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+4].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf5"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.log2(XDataNumericCopy[i]) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf5"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+5].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf6"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.log1p(XDataNumericCopy[i]) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf6"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+6].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf7"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) else: d={} XDataNumericCopy = XDataNumeric.copy() XDataNumericCopy[i] = np.log10(XDataNumericCopy[i]) - XDataNumericCopy[i] = XDataNumericCopy[i].round() for number in range(1,6): quadrantVariable = str('quadrant%s' % number) illusion = locals()[quadrantVariable] d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] - dicTransf["transf4"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + dicTransf["transf7"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+7].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf8"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.exp2(XDataNumericCopy[i]) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf8"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+8].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf9"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.expm1(XDataNumericCopy[i]) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf9"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+9].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf10"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.power(XDataNumericCopy[i], 2) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf10"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+10].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf11"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.power(XDataNumericCopy[i], 3) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf11"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + splittedCol = columnsNames[(count)*len(listofTransformations)+11].split('_') + if(len(splittedCol) == 1): + d={} + XDataNumericCopy = XDataNumeric.copy() + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf12"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) + else: + d={} + XDataNumericCopy = XDataNumeric.copy() + XDataNumericCopy[i] = np.power(XDataNumericCopy[i], 4) + for number in range(1,6): + quadrantVariable = str('quadrant%s' % number) + illusion = locals()[quadrantVariable] + d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] + dicTransf["transf12"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) packCorrTransformed.append(dicTransf) return 'Everything Okay' @@ -833,7 +1002,6 @@ def NewComputationTransf(DataRows1, DataRows2, DataRows3, DataRows4, DataRows5, corrMatrix4 = corrMatrix4.abs() corrMatrix5 = DataRows5.corr() corrMatrix5 = corrMatrix5.abs() - corrMatrix1 = corrMatrix1.loc[[feature]] corrMatrix2 = corrMatrix2.loc[[feature]] corrMatrix3 = corrMatrix3.loc[[feature]]