From f9027270484d8ae6d67ecbc9aa4697f63dc910e4 Mon Sep 17 00:00:00 2001 From: Angelos Chatzimparmpas Date: Fri, 6 Mar 2020 16:04:13 +0100 Subject: [PATCH] updates --- __pycache__/run.cpython-37.pyc | Bin 65087 -> 65462 bytes frontend/package-lock.json | 28 +- frontend/package.json | 2 + frontend/src/components/Active.vue | 4 +- .../src/components/AlgorithmHyperParam.vue | 56 ++-- .../src/components/BalancePredictions.vue | 8 +- frontend/src/components/BarChart.vue | 16 +- frontend/src/components/DataSpace.vue | 65 ++--- .../src/components/FinalResultsLinePlot.vue | 64 +++-- frontend/src/components/Heatmap.vue | 1 - frontend/src/components/Main.vue | 13 +- frontend/src/components/PCPData.vue | 7 +- frontend/src/components/Parameters.vue | 6 +- frontend/src/components/PerMetricBarChart.vue | 10 +- frontend/src/components/PredictionsSpace.vue | 37 +-- frontend/src/components/Provenance.vue | 247 ++++++++++-------- frontend/src/components/ScatterPlot.vue | 18 +- frontend/src/components/ToggleSelection.vue | 6 +- run.py | 32 ++- 19 files changed, 346 insertions(+), 274 deletions(-) diff --git a/__pycache__/run.cpython-37.pyc b/__pycache__/run.cpython-37.pyc index 206fa8b3e00d214a486427c260af339c3f9f3a24..976f33c83be65ddbe6bad9e29865fcaa998e66bf 100644 GIT binary patch delta 2904 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 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ec354a653..f031819a5 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12346,6 +12346,13 @@ "pipe": "0.0.2", "underscore": "1.1.6", "underscore.string": "1.1.4" + }, + "dependencies": { + "underscore": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz", + "integrity": "sha1-aGjaG91y11KFvgtOUPIo5w0AGiw=" + } } }, "flat-cache": { @@ -24788,9 +24795,9 @@ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" }, "underscore": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz", - "integrity": "sha1-aGjaG91y11KFvgtOUPIo5w0AGiw=" + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", + "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==" }, "underscore.string": { "version": "1.1.4", @@ -24798,6 +24805,13 @@ "integrity": "sha1-m+BrI7jj2ZbqICD5mEICBp497hI=", "requires": { "underscore": "1.1.6" + }, + "dependencies": { + "underscore": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz", + "integrity": "sha1-aGjaG91y11KFvgtOUPIo5w0AGiw=" + } } }, "unicode-canonical-property-names-ecmascript": { @@ -26429,6 +26443,14 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vue-underscore": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/vue-underscore/-/vue-underscore-0.1.4.tgz", + "integrity": "sha1-w9zuJqbgJ53ylEimBBp+ZMIJgao=", + "requires": { + "underscore": "^1.8.3" + } + }, "vue2-perfect-scrollbar": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/vue2-perfect-scrollbar/-/vue2-perfect-scrollbar-1.3.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 7ed642b45..a668fada5 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -69,6 +69,7 @@ "strip-loader": "^0.1.2", "toposort": "^2.0.2", "transform-loader": "^0.2.4", + "underscore": "^1.9.2", "update": "^0.7.4", "vega": "^5.9.1", "vue": "^2.6.11", @@ -77,6 +78,7 @@ "vue-plotly": "^1.1.0", "vue-router": "^3.1.5", "vue-slider-component": "^3.1.1", + "vue-underscore": "^0.1.4", "vue2-simplert-plugin": "^0.5.3", "webpack-cli": "^3.3.11", "webpack-require": "0.0.16" diff --git a/frontend/src/components/Active.vue b/frontend/src/components/Active.vue index 3c9a642d4..2e6f78722 100644 --- a/frontend/src/components/Active.vue +++ b/frontend/src/components/Active.vue @@ -15,12 +15,12 @@ export default { name: 'Active', data () { return { - valueActive: 'Compute Active Metamodel\'s Performance' + valueActive: 'Compute Metamodel\'s Performance' } }, methods: { sendUpdateActive () { - EventBus.$emit('OpenModal') + EventBus.$emit('sendToServerFeatures') } } } diff --git a/frontend/src/components/AlgorithmHyperParam.vue b/frontend/src/components/AlgorithmHyperParam.vue index 424c5de8b..f577a96ef 100644 --- a/frontend/src/components/AlgorithmHyperParam.vue +++ b/frontend/src/components/AlgorithmHyperParam.vue @@ -185,7 +185,7 @@ export default { } else if (this.selAlgorithm == 'SVC') { Combined = JSON.parse(this.ModelsPerformance[10]) colorGiv = colors[1] - } else if (this.selAlgorithm == 'GausNB') { + } else if (this.selAlgorithm == 'GauNB') { Combined = JSON.parse(this.ModelsPerformance[19]) colorGiv = colors[2] } else if (this.selAlgorithm == 'MLP') { @@ -232,72 +232,72 @@ export default { for (var i = 0; i < valuesPerf.length; i++) { if (this.keyAllOrClass) { if (this.selAlgorithm === 'KNN') { - newObjectsParamsΚΝΝ.push({model: i,'# Performance (%) #': McKNN[i],'n_neighbors':ObjectsParams[i].n_neighbors,'metric':ObjectsParams[i].metric,'algorithm':ObjectsParams[i].algorithm,'weights':ObjectsParams[i].weights}) + newObjectsParamsΚΝΝ.push({model: i,'# Perf (%) #': McKNN[i],'n_neighbors':ObjectsParams[i].n_neighbors,'metric':ObjectsParams[i].metric,'algorithm':ObjectsParams[i].algorithm,'weights':ObjectsParams[i].weights}) ArrayCombined[i] = newObjectsParamsΚΝΝ[i] } else if (this.selAlgorithm === 'SVC') { - newObjectsParamsSVC.push({model: this.SVCModels + i,'# Performance (%) #': McSVC[i],'C':ObjectsParams[i].C,'kernel':ObjectsParams[i].kernel}) + newObjectsParamsSVC.push({model: this.SVCModels + i,'# Perf (%) #': McSVC[i],'C':ObjectsParams[i].C,'kernel':ObjectsParams[i].kernel}) ArrayCombined[i] = newObjectsParamsSVC[i] - } else if (this.selAlgorithm === 'GausNB') { - newObjectsParamsGausNB.push({model: this.GausNBModels + i,'# Performance (%) #': McGausNB[i],'var_smoothing':ObjectsParams[i].var_smoothing}) + } else if (this.selAlgorithm === 'GauNB') { + newObjectsParamsGausNB.push({model: this.GausNBModels + i,'# Perf (%) #': McGausNB[i],'var_smoothing':ObjectsParams[i].var_smoothing}) ArrayCombined[i] = newObjectsParamsGausNB[i] } else if (this.selAlgorithm === 'MLP') { - newObjectsParamsMLP.push({model: this.MLPModels + i,'# Performance (%) #': McMLP[i],'alpha':ObjectsParams[i].alpha,'tol':ObjectsParams[i].tol,'activation':ObjectsParams[i].activation,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver}) + newObjectsParamsMLP.push({model: this.MLPModels + i,'# Perf (%) #': McMLP[i],'alpha':ObjectsParams[i].alpha,'tol':ObjectsParams[i].tol,'activation':ObjectsParams[i].activation,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver}) ArrayCombined[i] = newObjectsParamsMLP[i] } else if (this.selAlgorithm === 'LR') { - newObjectsParamsLR.push({model: this.LRModels + i,'# Performance (%) #': McLR[i],'C':ObjectsParams[i].C,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver,'penalty':ObjectsParams[i].penalty}) + newObjectsParamsLR.push({model: this.LRModels + i,'# Perf (%) #': McLR[i],'C':ObjectsParams[i].C,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver,'penalty':ObjectsParams[i].penalty}) ArrayCombined[i] = newObjectsParamsLR[i] } else if (this.selAlgorithm === 'LDA') { - newObjectsParamsLDA.push({model: this.LDAModels + i,'# Performance (%) #': McLDA[i],'shrinkage':ObjectsParams[i].shrinkage,'solver':ObjectsParams[i].solver}) + newObjectsParamsLDA.push({model: this.LDAModels + i,'# Perf (%) #': McLDA[i],'shrinkage':ObjectsParams[i].shrinkage,'solver':ObjectsParams[i].solver}) ArrayCombined[i] = newObjectsParamsLDA[i] } else if (this.selAlgorithm === 'QDA') { - newObjectsParamsQDA.push({model: this.QDAModels + i,'# Performance (%) #': McQDA[i],'reg_param':ObjectsParams[i].reg_param,'tol':ObjectsParams[i].tol}) + newObjectsParamsQDA.push({model: this.QDAModels + i,'# Perf (%) #': McQDA[i],'reg_param':ObjectsParams[i].reg_param,'tol':ObjectsParams[i].tol}) ArrayCombined[i] = newObjectsParamsQDA[i] } else if (this.selAlgorithm === 'RF') { - newObjectsParamsRF.push({model: this.RFModels + i,'# Performance (%) #': McRF[i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) + newObjectsParamsRF.push({model: this.RFModels + i,'# Perf (%) #': McRF[i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) ArrayCombined[i] = newObjectsParamsRF[i] } else if (this.selAlgorithm === 'ExtraT') { - newObjectsParamsExtraT.push({model: this.ExtraTModels + i,'# Performance (%) #': McExtraT[i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) + newObjectsParamsExtraT.push({model: this.ExtraTModels + i,'# Perf (%) #': McExtraT[i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) ArrayCombined[i] = newObjectsParamsExtraT[i] } else if (this.selAlgorithm === 'AdaB') { - newObjectsParamsAdaB.push({model: this.AdaBModels + i,'# Performance (%) #': McAdaB[i],'n_estimators':ObjectsParams[i].n_estimators,'learning_rate':ObjectsParams[i].learning_rate,'algorithm':ObjectsParams[i].algorithm}) + newObjectsParamsAdaB.push({model: this.AdaBModels + i,'# Perf (%) #': McAdaB[i],'n_estimators':ObjectsParams[i].n_estimators,'learning_rate':ObjectsParams[i].learning_rate,'algorithm':ObjectsParams[i].algorithm}) ArrayCombined[i] = newObjectsParamsAdaB[i] } else { - newObjectsParamsGradB.push({model: this.GradBModels + i,'# Performance (%) #': McGradB[i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion,'learning_rate':ObjectsParams[i].learning_rate}) + newObjectsParamsGradB.push({model: this.GradBModels + i,'# Perf (%) #': McGradB[i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion,'learning_rate':ObjectsParams[i].learning_rate}) ArrayCombined[i] = newObjectsParamsGradB[i] } } else { if (this.selAlgorithm === 'KNN') { - newObjectsParamsΚΝΝ.push({model: i,'# Performance (%) #': this.listClassPerf[0][i],'n_neighbors':ObjectsParams[i].n_neighbors,'metric':ObjectsParams[i].metric,'algorithm':ObjectsParams[i].algorithm,'weights':ObjectsParams[i].weights}) + newObjectsParamsΚΝΝ.push({model: i,'# Perf (%) #': this.listClassPerf[0][i],'n_neighbors':ObjectsParams[i].n_neighbors,'metric':ObjectsParams[i].metric,'algorithm':ObjectsParams[i].algorithm,'weights':ObjectsParams[i].weights}) ArrayCombined[i] = newObjectsParamsΚΝΝ[i] } else if (this.selAlgorithm === 'SVC') { - newObjectsParamsSVC.push({model: this.SVCModels + i,'# Performance (%) #': this.listClassPerf[1][i],'C':ObjectsParams[i].C,'kernel':ObjectsParams[i].kernel}) + newObjectsParamsSVC.push({model: this.SVCModels + i,'# Perf (%) #': this.listClassPerf[1][i],'C':ObjectsParams[i].C,'kernel':ObjectsParams[i].kernel}) ArrayCombined[i] = newObjectsParamsSVC[i] - } else if (this.selAlgorithm === 'GausNB') { - newObjectsParamsGausNB.push({model: this.GausNBModels + i,'# Performance (%) #': this.listClassPerf[2][i],'var_smoothing':ObjectsParams[i].var_smoothing}) + } else if (this.selAlgorithm === 'GauNB') { + newObjectsParamsGausNB.push({model: this.GausNBModels + i,'# Perf (%) #': this.listClassPerf[2][i],'var_smoothing':ObjectsParams[i].var_smoothing}) ArrayCombined[i] = newObjectsParamsGausNB[i] } else if (this.selAlgorithm === 'MLP') { - newObjectsParamsMLP.push({model: this.MLPModels + i,'# Performance (%) #': this.listClassPerf[3][i],'alpha':ObjectsParams[i].alpha,'tol':ObjectsParams[i].tol,'activation':ObjectsParams[i].activation,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver}) + newObjectsParamsMLP.push({model: this.MLPModels + i,'# Perf (%) #': this.listClassPerf[3][i],'alpha':ObjectsParams[i].alpha,'tol':ObjectsParams[i].tol,'activation':ObjectsParams[i].activation,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver}) ArrayCombined[i] = newObjectsParamsMLP[i] } else if (this.selAlgorithm === 'LR') { - newObjectsParamsLR.push({model: this.LRModels + i,'# Performance (%) #': this.listClassPerf[4][i],'C':ObjectsParams[i].C,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver,'penalty':ObjectsParams[i].penalty}) + newObjectsParamsLR.push({model: this.LRModels + i,'# Perf (%) #': this.listClassPerf[4][i],'C':ObjectsParams[i].C,'max_iter':ObjectsParams[i].max_iter,'solver':ObjectsParams[i].solver,'penalty':ObjectsParams[i].penalty}) ArrayCombined[i] = newObjectsParamsLR[i] } else if (this.selAlgorithm === 'LDA') { - newObjectsParamsLDA.push({model: this.LDAModels + i,'# Performance (%) #': this.listClassPerf[5][i],'shrinkage':ObjectsParams[i].shrinkage,'solver':ObjectsParams[i].solver}) + newObjectsParamsLDA.push({model: this.LDAModels + i,'# Perf (%) #': this.listClassPerf[5][i],'shrinkage':ObjectsParams[i].shrinkage,'solver':ObjectsParams[i].solver}) ArrayCombined[i] = newObjectsParamsLDA[i] } else if (this.selAlgorithm === 'QDA') { - newObjectsParamsQDA.push({model: this.QDAModels + i,'# Performance (%) #': this.listClassPerf[6][i],'reg_param':ObjectsParams[i].reg_param,'tol':ObjectsParams[i].tol}) + newObjectsParamsQDA.push({model: this.QDAModels + i,'# Perf (%) #': this.listClassPerf[6][i],'reg_param':ObjectsParams[i].reg_param,'tol':ObjectsParams[i].tol}) ArrayCombined[i] = newObjectsParamsQDA[i] } else if (this.selAlgorithm === 'RF') { - newObjectsParamsRF.push({model: this.RFModels + i,'# Performance (%) #': this.listClassPerf[7][i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) + newObjectsParamsRF.push({model: this.RFModels + i,'# Perf (%) #': this.listClassPerf[7][i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) ArrayCombined[i] = newObjectsParamsRF[i] } else if (this.selAlgorithm === 'ExtraT') { - newObjectsParamsExtraT.push({model: this.ExtraTModels + i,'# Performance (%) #': this.listClassPerf[8][i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) + newObjectsParamsExtraT.push({model: this.ExtraTModels + i,'# Perf (%) #': this.listClassPerf[8][i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion}) ArrayCombined[i] = newObjectsParamsExtraT[i] } else if (this.selAlgorithm === 'AdaB') { - newObjectsParamsAdaB.push({model: this.AdaBModels + i,'# Performance (%) #': this.listClassPerf[9][i],'n_estimators':ObjectsParams[i].n_estimators,'learning_rate':ObjectsParams[i].learning_rate,'algorithm':ObjectsParams[i].algorithm}) + newObjectsParamsAdaB.push({model: this.AdaBModels + i,'# Perf (%) #': this.listClassPerf[9][i],'n_estimators':ObjectsParams[i].n_estimators,'learning_rate':ObjectsParams[i].learning_rate,'algorithm':ObjectsParams[i].algorithm}) ArrayCombined[i] = newObjectsParamsAdaB[i] } else { - newObjectsParamsGradB.push({model: this.GradBModels + i,'# Performance (%) #': this.listClassPerf[10][i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion,'learning_rate':ObjectsParams[i].learning_rate}) + newObjectsParamsGradB.push({model: this.GradBModels + i,'# Perf (%) #': this.listClassPerf[10][i],'n_estimators':ObjectsParams[i].n_estimators,'criterion':ObjectsParams[i].criterion,'learning_rate':ObjectsParams[i].learning_rate}) ArrayCombined[i] = newObjectsParamsGradB[i] } } @@ -306,12 +306,6 @@ export default { this.pc = ParCoords()("#PCP") .data(ArrayCombined) .color(colorGiv) - .margin({ - top: 25, - left: 25, - right: 25, - bottom: 25 - }) .hideAxis(['model']) .bundlingStrength(0) // set bundling strength .smoothness(0) diff --git a/frontend/src/components/BalancePredictions.vue b/frontend/src/components/BalancePredictions.vue index c3ef8aa9b..7102a7a52 100644 --- a/frontend/src/components/BalancePredictions.vue +++ b/frontend/src/components/BalancePredictions.vue @@ -189,10 +189,10 @@ var heightforText = 215 svg.append("circle").attr("cx", 215).attr("cy", heightforText-1.5).attr("r", 6).style("fill", "#000") svg.append("circle").attr("cx", 785).attr("cy", heightforText-1.5).attr("r", 6).style("fill", "#D3D3D3") - svg.append("text").attr("x", 230).attr("y", heightforText).text("All Points").style("font-size", "15px").attr("alignment-baseline","middle") - svg.append("text").attr("x", 515).attr("y", heightforText-10).text("# Performance (%) #").style("font-size", "15px").attr("alignment-baseline","top") - svg.append("text").attr("x", 800).attr("y", heightforText).text("Selected Points").style("font-size", "15px").attr("alignment-baseline","middle") - svg.append("text").attr("transform", "rotate(-90)").attr("x", -89).attr("y", -45).style("text-anchor", "middle").text("Number of Models"); + svg.append("text").attr("x", 230).attr("y", heightforText).text("All Points").style("font-size", "16px").attr("alignment-baseline","middle") + svg.append("text").attr("x", 515).attr("y", heightforText-10).text("# Performance (%) #").style("font-size", "16px").attr("alignment-baseline","top") + svg.append("text").attr("x", 800).attr("y", heightforText).text("Selected Points").style("font-size", "16px").attr("alignment-baseline","middle") + svg.append("text").attr("transform", "rotate(-90)").attr("x", -89).attr("y", -45).style("text-anchor", "middle").style("font-size", "16px").text("Number of Models"); // Function to compute density function kernelDensityEstimator(kernel, X) { diff --git a/frontend/src/components/BarChart.vue b/frontend/src/components/BarChart.vue index 04963eee2..664418ff2 100644 --- a/frontend/src/components/BarChart.vue +++ b/frontend/src/components/BarChart.vue @@ -408,8 +408,8 @@ export default { var layout = {font: { family: 'Helvetica', size: 14, color: '#000000' }, autosize: true, barmode: 'group', - width: this.WH[0]*10.21, - height: this.WH[1]*0.59, + width: this.WH[0]*10.205, + height: this.WH[1]*0.6, xaxis: { title: 'Algorithm', type:"category", @@ -535,7 +535,7 @@ export default { } var barc = document.getElementById('barChart'); - var config = {scrollZoom: true, displaylogo: false, showLink: false, showSendToCloud: false, modeBarButtonsToRemove: ['toImage'], responsive: true} + var config = {displayModeBar: false, scrollZoom: true, displaylogo: false, showLink: false, showSendToCloud: false, modeBarButtonsToRemove: ['toImage'], responsive: true} Plotly.newPlot(barc, data, layout, config) @@ -544,7 +544,15 @@ export default { eventData.points.forEach((e) => { tName = e.data.name.replace(/ *\([^)]*\) */g, "") }); - this.tNameAll = tName + if (tName == "< 50% diameter narrowing / Healthy") { + tName = 0 + this.tNameAll = 0 + } else if (tName == "> 50% diameter narrowing / Diseased"){ + tName = 1 + this.tNameAll = 1 + } else { + this.tNameAll = tName + } EventBus.$emit('clearPCP') EventBus.$emit('alternateFlagLock') EventBus.$emit('boxplotSet', [storeKNN[tName],storeSVC[tName],storeGausNB[tName],storeMLP[tName],storeLR[tName],storeLDA[tName],storeQDA[tName],storeRF[tName],storeExtraT[tName],storeAdaB[tName],storeGradB[tName]]) diff --git a/frontend/src/components/DataSpace.vue b/frontend/src/components/DataSpace.vue index da9b9e645..424500630 100644 --- a/frontend/src/components/DataSpace.vue +++ b/frontend/src/components/DataSpace.vue @@ -135,27 +135,15 @@ export default { const XandYCoordinatesTSNE = JSON.parse(this.dataPoints[5]) const XandYCoordinatesUMAP = JSON.parse(this.dataPoints[6]) const impSizeArray = JSON.parse(this.dataPoints[7]) - const KNNSize = JSON.parse(impSizeArray[7]) - const SVCSize = JSON.parse(impSizeArray[16]) - const GausNBSize = JSON.parse(impSizeArray[25]) - const MLPSize = JSON.parse(impSizeArray[34]) - const LRSize = JSON.parse(impSizeArray[43]) - const LDASize = JSON.parse(impSizeArray[52]) - const QDASize = JSON.parse(impSizeArray[61]) - const RFSize = JSON.parse(impSizeArray[70]) - const ExtraTSize = JSON.parse(impSizeArray[79]) - const AdaBSize = JSON.parse(impSizeArray[88]) - const GradBSize = JSON.parse(impSizeArray[97]) - - console.log(KNNSize) + var sizeScatterplot = [] var scale = d3.scaleLinear() .domain([0,1]) - .range([2,30]); + .range([10,20]); - for (let i = 0; i < KNNSize.length; i++) { - sizeScatterplot.push(scale((KNNSize[i] + SVCSize[i] + GausNBSize[i] + MLPSize[i] + LRSize[i] + LDASize[i] + QDASize[i] + RFSize[i] + ExtraTSize[i] + AdaBSize[i] + GradBSize[i]) / 11)) + for (let i = 0; i < impSizeArray.length; i++) { + sizeScatterplot.push(scale(impSizeArray[i])) } let intData = [] @@ -171,7 +159,21 @@ export default { var Xaxs = [] var Yaxs = [] var Opacity - + + var beautifyLabels = [] + if (this.RetrieveDataSet == 'StanceC') { + beautifyLabels.push('Absence of Hypotheticality') + beautifyLabels.push('Presence of Hypotheticality') + } + else if (this.RetrieveDataSet == 'HeartC') { + beautifyLabels.push('< 50% diameter narrowing / Healthy') + beautifyLabels.push('> 50% diameter narrowing / Diseased') + } else { + target_names.forEach(element => { + beautifyLabels.push(element) + }); + } + if (this.representationDef == 'mds') { for (let i = 0; i < XandYCoordinatesMDS[0].length; i++) { Xaxs.push(XandYCoordinatesMDS[0][i]) @@ -185,20 +187,6 @@ export default { var traces = [] var layout = [] - var beautifyLabels = [] - if (this.RetrieveDataSet == 'StanceC') { - beautifyLabels.push('Absence of Hypotheticality') - beautifyLabels.push('Presence of Hypotheticality') - } - else if (this.RetrieveDataSet == 'HeartC') { - beautifyLabels.push('< 50% diameter narrowing / Healthy') - beautifyLabels.push('> 50% diameter narrowing / Diseased') - } else { - target_names.forEach(element => { - beautifyLabels.push(element) - }); - } - for (let i = 0; i < target_names.length; i++) { const aux_X = result.Xax.filter((item, index) => originalDataLabels[index] == target_names[i]); @@ -237,7 +225,7 @@ export default { } layout = {font: { family: 'Helvetica', size: 14, color: '#000000' }, - title: 'MDS Projection', + legend: {orientation: 'h', xanchor: 'center', x: 0.5}, xaxis: { visible: false }, @@ -316,7 +304,7 @@ export default { } layout = {font: { family: 'Helvetica', size: 14, color: '#000000' }, - title: 't-SNE Projection', + legend: {orientation: 'h', xanchor: 'center', x: 0.5}, xaxis: { visible: false }, @@ -385,7 +373,7 @@ export default { } layout = {font: { family: 'Helvetica', size: 14, color: '#000000' }, - title: 'UMAP Projection', + legend: {orientation: 'h', xanchor: 'center', x: 0.5}, xaxis: { visible: false }, @@ -423,11 +411,10 @@ export default { if (evt.points[i] === undefined) { break } else { - const OnlyId = evt.points[i].text.split(';') - ClassifierIDsList.push(OnlyId[0]) - let numb = OnlyId[0].match(/\d/g); - numb = numb.join(""); - let numberNumb = Number(numb) + const OnlyId = evt.points[i].text.split('
') + const ImpID = OnlyId[0].split(' ') + ClassifierIDsList.push(ImpID[3]) + let numberNumb = parseInt(ImpID[3]) ClassifierIDsListCleared.push(numberNumb) } } diff --git a/frontend/src/components/FinalResultsLinePlot.vue b/frontend/src/components/FinalResultsLinePlot.vue index 9b307cdf4..01aa7df56 100644 --- a/frontend/src/components/FinalResultsLinePlot.vue +++ b/frontend/src/components/FinalResultsLinePlot.vue @@ -1,5 +1,5 @@