From 6a56a44eaae2ebae0630f08ac4342f2f3ca21b77 Mon Sep 17 00:00:00 2001 From: Angelos Chatzimparmpas Date: Sat, 2 Jan 2021 21:24:04 +0100 Subject: [PATCH] new --- __pycache__/run.cpython-38.pyc | Bin 27681 -> 27671 bytes .../src/components/FeatureSpaceDetail.vue | 17 ++++++++--------- frontend/src/components/Heatmap.vue | 18 ++++++++++-------- frontend/src/components/Main.vue | 3 +-- frontend/src/components/Results.vue | 2 +- run.py | 2 -- 6 files changed, 20 insertions(+), 22 deletions(-) diff --git a/__pycache__/run.cpython-38.pyc b/__pycache__/run.cpython-38.pyc index 668336b7ec77c068bb68c8501397a74c254dd463..4bd0b405e1698e24f786844b821bb6c414725450 100644 GIT binary patch delta 354 zcmWlVPbkB20L8uEmVWy&tvR@?tubwOK#|zL%iN^=Hk*b*VMJCtt^7+l$duYEe^wqrzb~xxsOS=-&YBvWwMlPrketHsg`bKfa zEngB39QQ{#>^C8&QNL8E7`(W2H#4oMa3q$L#glQqSO-jgcCbo8mG4^nYdcA22anibjbPjVe|LzRE9vwL9x delta 367 zcmXAhPiT^H0ET;ieTUDleNu|Bz-gkO8BAn{z<&_ZPDA_@H@1=rHVOs_QI{Q3S8bOF z+PmCjf2hk2IR@LWLr_SRd5P_~$%qaOViL42LPS_LUwGlUJkLS{FB&jsbX_~q*~8+` zYiFyQ=5Kba%a+{(MR@?w<|yD5OO613vF?Z?Ld_XRfeGgTR^_yF891cVwTPyC?Xn2m zr^Kk9p%bh>t87H&EwSV+voGP36$)m=mH$=~N9qN?V1yi{H~$gyi3JTVO`Ehw}pS zygypT3VX-quqG>G7GR6jE4z3jpI!BzLQTHA83sJ^&#ir79Z`L!p{bo~s_8$e7ulTb F{|732f_DG_ diff --git a/frontend/src/components/FeatureSpaceDetail.vue b/frontend/src/components/FeatureSpaceDetail.vue index e89c595..13b2691 100644 --- a/frontend/src/components/FeatureSpaceDetail.vue +++ b/frontend/src/components/FeatureSpaceDetail.vue @@ -122,6 +122,7 @@ export default { var VIFRemainingLoc = [] var MIRemainingLoc = [] var pushEachFinal = [] + this.dataFSTrans.forEach(function(element, index) { var round = element.round round = JSON.parse(round[loop-1]) @@ -223,7 +224,7 @@ export default { var quadrantNumberLocal = this.quadrantNumber var listofNodes = this.dataFS[34] var dataLoc = JSON.parse(this.dataFS[3+quadrantNumberLocal]) - + var pushEachFinal = [] var pushEach var oldVal @@ -348,7 +349,7 @@ export default { Object.entries(dataLoc).forEach( function ([feature, value]) { Object.entries(value).forEach( function ([featureInside, value]) { - if (feature != featureInside) { + if (feature != featureInside) { if (value >= threshLoc) { links.push({"source": listofNodes.indexOf(feature), "target": listofNodes.indexOf(featureInside), "value": Math.abs(value) * 30, "lin_color": "#D3D3D3"}) } else { @@ -369,15 +370,14 @@ export default { ) }) - var lengthFeatureAddRem = this.featureAddRemCount.length - Object.entries(pushEachFinal).forEach( function ([index, feature]) { feature.value.forEach(function (element, indexIns) { if (element.valueIns > 0) { - links.push({"source": index, "target": (index*feature.value.length+feature.value.length+indexIns)-lengthFeatureAddRem, "value": Math.abs(element.valueIns) * 30, "lin_color": "#33a02c"}) - } else { - links.push({"source": index, "target": (index*feature.value.length+feature.value.length+indexIns)-lengthFeatureAddRem, "value": Math.abs(element.valueIns) * 30, "lin_color": "#e31a1c"}) + links.push({"source": index, "target": (index*feature.value.length+pushEachFinal.length+indexIns), "value": Math.abs(element.valueIns) * 30, "lin_color": "#33a02c"}) + } + else { + links.push({"source": index, "target": (index*feature.value.length+pushEachFinal.length+indexIns), "value": Math.abs(element.valueIns) * 30, "lin_color": "#e31a1c"}) } }) }) @@ -624,7 +624,6 @@ export default { EventBus.$emit('UpdateIDs', IDsGather) EventBus.$emit('CompareThree', IDsGather) } else { - } } } else { @@ -637,7 +636,7 @@ export default { } EventBus.$emit('UpdateIDs', IDsGather) if (selectionCounter == 1) { - EventBus.$emit('Default') + EventBus.$emit('storeGeneration') } else if (selectionCounter == 2) { EventBus.$emit('UpdateIDs', IDsGather) EventBus.$emit('CompareTwo', IDsGather) diff --git a/frontend/src/components/Heatmap.vue b/frontend/src/components/Heatmap.vue index 351deac..aa772f8 100644 --- a/frontend/src/components/Heatmap.vue +++ b/frontend/src/components/Heatmap.vue @@ -87,7 +87,6 @@ export default { } else { var Features = this.generKey } - console.log(Features) let arr = Object.values(featureUni.Score); let minUni = Math.min(...arr); let maxUni = Math.max(...arr); @@ -249,9 +248,10 @@ export default { return d.count > 1 ? d.join("/") : d; }) .style('font-weight', function(d) { - if (d[0] == "# Action #" || d[0] == "Average") { - return "bold" - } + // console.log(d) + // if (d[0] === "# Action #" || d[0] === "Average") { + // return "bold" + // } }) .attr("x", 0) .attr("y", function(d, i) { @@ -293,9 +293,9 @@ export default { }) .style("text-anchor", "left") .style('font-weight',function(d,i){ - /*if (d[0] === "Average") { + if (d[0] === "# Action #" || d[0] === "Average") { return "bold" - }*/ + } }) .attr("transform", function(d, i) { return "translate(" + cellSize / 2 + ", -3) rotate(-90) rotate(45, 0, " + (i * cellSize) + ")"; @@ -311,9 +311,10 @@ export default { d3.select('#colLabel_' + i).classed("hover", false); }) .on("click", function(d, i) { + console.log(d) colSortOrder = !colSortOrder; sortByValues("c", i, colSortOrder); - d3.select("#order").property("selectedIndex", 0); + d3.select("#order").property("selectedIndex", 3); }); var row = svg.selectAll(".row") @@ -401,7 +402,7 @@ export default { } else { if (d == -4) { const index = featuresGen.indexOf(k); - console.log(index) + if (index > -1) { featuresGen.splice(index, 1); } @@ -535,6 +536,7 @@ export default { }); //================================================== + d3.select('#colLabel_3').dispatch('click'); }, changeOrder(newOrder, heatmapId) { var svg = d3.select(heatmapId); diff --git a/frontend/src/components/Main.vue b/frontend/src/components/Main.vue index 3c1cd00..0ccf5d1 100755 --- a/frontend/src/components/Main.vue +++ b/frontend/src/components/Main.vue @@ -459,7 +459,6 @@ export default Vue.extend({ .then(response => { console.log('Server successfully send the importances!') this.Importance = response.data.Importance - console.log(this.Importance) this.featureNames = [] EventBus.$emit('Generation', this.featureNames) EventBus.$emit('HeatmapCall', this.Importance) @@ -549,7 +548,7 @@ export default Vue.extend({ axios.post(path, postData, axiosConfig) .then(response => { console.log('Store newly generated features!') - EventBus.$emit('updateFeatureImp') + this.threshold() EventBus.$emit('Default') }) .catch(error => { diff --git a/frontend/src/components/Results.vue b/frontend/src/components/Results.vue index 951c5cb..613cd81 100644 --- a/frontend/src/components/Results.vue +++ b/frontend/src/components/Results.vue @@ -62,7 +62,7 @@ export default { var data = [] var features = this.featuresReceived[33] - var labelsX = ['Add', 'Remove', 'Transform', 'Generate'] + var labelsX = ['Include', 'Exclude', 'Transform', 'Generate'] for (let i=0; i< features.length; i++) { data.push({ label: features[i], diff --git a/run.py b/run.py index 31eaaf0..0ec44c4 100644 --- a/run.py +++ b/run.py @@ -475,7 +475,6 @@ def executeModel(exeCall, flagEx): XDataTemp = XDataGen[columnsKeepNew] XData[columnsKeepNew] = XDataTemp.values - print(XDataStored) print(XData) featureImportanceData = estimatorFeatureSelection(XData, estimator) estimator.fit(XData, yData) @@ -646,7 +645,6 @@ def Transformation(quadrant1, quadrant2, quadrant3, quadrant4, quadrant5): illusion = locals()[quadrantVariable] d["DataRows{0}".format(number)] = XDataNumericCopy.iloc[illusion, :] dicTransf["roundLog10"] = NewComputationTransf(d['DataRows1'], d['DataRows2'], d['DataRows3'], d['DataRows4'], d['DataRows5'], quadrant1, quadrant2, quadrant3, quadrant4, quadrant5, i, count) - packCorrTransformed.append(dicTransf) return 'Everything Okay'