parent 4fa191957a
commit b070bb3bc2
  1. BIN
      __pycache__/run.cpython-38.pyc
  2. 385
      frontend/src/components/FeatureSpaceDetail.vue
  3. 94
      frontend/src/components/FeatureSpaceOverview.vue
  4. 214
      run.py

Binary file not shown.

@ -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++
})

@ -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

214
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]]

Loading…
Cancel
Save