Former-commit-id: f902727048
master
parent 1203796056
commit 6b5e59dd88
  1. BIN
      __pycache__/run.cpython-37.pyc
  2. 28
      frontend/package-lock.json
  3. 2
      frontend/package.json
  4. 4
      frontend/src/components/Active.vue
  5. 56
      frontend/src/components/AlgorithmHyperParam.vue
  6. 8
      frontend/src/components/BalancePredictions.vue
  7. 16
      frontend/src/components/BarChart.vue
  8. 65
      frontend/src/components/DataSpace.vue
  9. 64
      frontend/src/components/FinalResultsLinePlot.vue
  10. 1
      frontend/src/components/Heatmap.vue
  11. 13
      frontend/src/components/Main.vue
  12. 7
      frontend/src/components/PCPData.vue
  13. 6
      frontend/src/components/Parameters.vue
  14. 10
      frontend/src/components/PerMetricBarChart.vue
  15. 37
      frontend/src/components/PredictionsSpace.vue
  16. 247
      frontend/src/components/Provenance.vue
  17. 18
      frontend/src/components/ScatterPlot.vue
  18. 6
      frontend/src/components/ToggleSelection.vue
  19. 32
      run.py

Binary file not shown.

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

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

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

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

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

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

@ -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('<br>')
const ImpID = OnlyId[0].split(' ')
ClassifierIDsList.push(ImpID[3])
let numberNumb = parseInt(ImpID[3])
ClassifierIDsListCleared.push(numberNumb)
}
}

@ -1,5 +1,5 @@
<template>
<div id="LinePlot" style="min-height: 365px;"></div>
<div id="LinePlot" style="min-height: 363px;"></div>
</template>
<script>
@ -45,7 +45,8 @@ export default {
Stack_scoresPositive4: [],
Stack_scoresNegative4: [],
xaxis: [],
WH: []
WH: [],
firstTime: 0
}
},
methods: {
@ -57,53 +58,53 @@ export default {
this.xaxis.push(this.NumberofExecutions)
// Under Exploration = Current
this.scoresMean.push((JSON.parse(this.FinalResultsforLinePlot[0])*100).toFixed(1))
this.scoresSTD.push((JSON.parse(this.FinalResultsforLinePlot[1])*100).toFixed(1))
this.scoresMean.push((JSON.parse(this.FinalResultsforLinePlot[0])*100).toFixed(2))
this.scoresSTD.push((JSON.parse(this.FinalResultsforLinePlot[1])*100).toFixed(2))
this.scoresPositive.push(parseFloat(this.scoresMean[this.scoresMean.length - 1]) + parseFloat(this.scoresSTD[this.scoresSTD.length - 1]))
this.scoresNegative.push(parseFloat(this.scoresMean[this.scoresMean.length - 1]) - parseFloat(this.scoresSTD[this.scoresSTD.length - 1]))
this.scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[2])*100).toFixed(1))
this.scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[3])*100).toFixed(1))
this.scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[2])*100).toFixed(2))
this.scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[3])*100).toFixed(2))
this.scoresPositive2.push(parseFloat(this.scoresMean2[this.scoresMean2.length - 1]) + parseFloat(this.scoresSTD2[this.scoresSTD2.length - 1]))
this.scoresNegative2.push(parseFloat(this.scoresMean2[this.scoresMean2.length - 1]) - parseFloat(this.scoresSTD2[this.scoresSTD2.length - 1]))
this.scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[4])*100).toFixed(1))
this.scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[5])*100).toFixed(1))
this.scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[4])*100).toFixed(2))
this.scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[5])*100).toFixed(2))
this.scoresPositive3.push(parseFloat(this.scoresMean3[this.scoresMean3.length - 1]) + parseFloat(this.scoresSTD3[this.scoresSTD3.length - 1]))
this.scoresNegative3.push(parseFloat(this.scoresMean3[this.scoresMean3.length - 1]) - parseFloat(this.scoresSTD3[this.scoresSTD3.length - 1]))
this.scoresMean4.push((JSON.parse(this.FinalResultsforLinePlot[6])*100).toFixed(1))
this.scoresSTD4.push((JSON.parse(this.FinalResultsforLinePlot[7])*100).toFixed(1))
this.scoresMean4.push((JSON.parse(this.FinalResultsforLinePlot[6])*100).toFixed(2))
this.scoresSTD4.push((JSON.parse(this.FinalResultsforLinePlot[7])*100).toFixed(2))
this.scoresPositive4.push(parseFloat(this.scoresMean4[this.scoresMean4.length - 1]) + parseFloat(this.scoresSTD4[this.scoresSTD4.length - 1]))
this.scoresNegative4.push(parseFloat(this.scoresMean4[this.scoresMean4.length - 1]) - parseFloat(this.scoresSTD4[this.scoresSTD4.length - 1]))
// Stack
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsforLinePlot[8])*100).toFixed(1))
this.Stack_scoresSTD.push((JSON.parse(this.FinalResultsforLinePlot[9])*100).toFixed(1))
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsforLinePlot[8])*100).toFixed(2))
this.Stack_scoresSTD.push((JSON.parse(this.FinalResultsforLinePlot[9])*100).toFixed(2))
this.Stack_scoresPositive.push(parseFloat(this.Stack_scoresMean[this.Stack_scoresMean.length - 1]) + parseFloat(this.Stack_scoresSTD[this.Stack_scoresSTD.length - 1]))
this.Stack_scoresNegative.push(parseFloat(this.Stack_scoresMean[this.Stack_scoresMean.length - 1]) - parseFloat(this.Stack_scoresSTD[this.Stack_scoresSTD.length - 1]))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[10])*100).toFixed(1))
this.Stack_scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[11])*100).toFixed(1))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[10])*100).toFixed(2))
this.Stack_scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[11])*100).toFixed(2))
this.Stack_scoresPositive2.push(parseFloat(this.Stack_scoresMean2[this.Stack_scoresMean2.length - 1]) + parseFloat(this.Stack_scoresSTD2[this.Stack_scoresSTD2.length - 1]))
this.Stack_scoresNegative2.push(parseFloat(this.Stack_scoresMean2[this.Stack_scoresMean2.length - 1]) - parseFloat(this.Stack_scoresSTD2[this.Stack_scoresSTD2.length - 1]))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[12])*100).toFixed(1))
this.Stack_scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[13])*100).toFixed(1))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[12])*100).toFixed(2))
this.Stack_scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[13])*100).toFixed(2))
this.Stack_scoresPositive3.push(parseFloat(this.Stack_scoresMean3[this.Stack_scoresMean3.length - 1]) + parseFloat(this.Stack_scoresSTD3[this.Stack_scoresSTD3.length - 1]))
this.Stack_scoresNegative3.push(parseFloat(this.Stack_scoresMean3[this.Stack_scoresMean3.length - 1]) - parseFloat(this.Stack_scoresSTD3[this.Stack_scoresSTD3.length - 1]))
this.Stack_scoresMean4.push((JSON.parse(this.FinalResultsforLinePlot[14])*100).toFixed(1))
this.Stack_scoresSTD4.push((JSON.parse(this.FinalResultsforLinePlot[15])*100).toFixed(1))
this.Stack_scoresMean4.push((JSON.parse(this.FinalResultsforLinePlot[14])*100).toFixed(2))
this.Stack_scoresSTD4.push((JSON.parse(this.FinalResultsforLinePlot[15])*100).toFixed(2))
this.Stack_scoresPositive4.push(parseFloat(this.Stack_scoresMean4[this.Stack_scoresMean4.length - 1]) + parseFloat(this.Stack_scoresSTD4[this.Stack_scoresSTD4.length - 1]))
this.Stack_scoresNegative4.push(parseFloat(this.Stack_scoresMean4[this.Stack_scoresMean4.length - 1]) - parseFloat(this.Stack_scoresSTD4[this.Stack_scoresSTD4.length - 1]))
@ -176,7 +177,7 @@ export default {
line: {color: "rgb(55,126,184)"},
mode: "lines+markers",
marker : {
symbol: 'triangle' },
symbol: 'triangle-up' },
name: "Active Recall",
type: "scatter"
}
@ -278,7 +279,7 @@ export default {
line: {color: "rgb(228,26,28)"},
mode: "lines+markers",
marker : {
symbol: 'pentagon' },
symbol: 'triangle-down' },
name: "Stack Recall",
type: "scatter"
}
@ -323,10 +324,11 @@ export default {
const DataforLinePlot = [trace1, trace2, trace3, trace4, trace5, trace6, trace7, trace8, trace9, trace10, trace11, trace12, trace13, trace14, trace15, trace16]
var width = this.WH[0]*3 // interactive visualization
var height = this.WH[1]*0.6 // interactive visualization
var width = this.WH[0]*3.18 // interactive visualization
var height = this.WH[1]*0.765 // interactive visualization
var layout = {
font: { family: 'Helvetica', size: 14, color: '#000000' },
paper_bgcolor: "rgb(255,255,255)",
plot_bgcolor: "rgb(229,229,229)",
xaxis: {
@ -355,17 +357,25 @@ export default {
width: width,
height: height,
margin: {
l: 60,
r: 40,
b: 40,
t: 40,
l: 50,
r: 0,
b: 50,
t: 5,
pad: 0
},
}
Plotly.newPlot('LinePlot', DataforLinePlot, layout, {showSendToCloud: true, responsive: true})
var config = {displayModeBar: false, scrollZoom: true, displaylogo: false, showLink: false, showSendToCloud: false, modeBarButtonsToRemove: ['toImage'], responsive: true}
Plotly.newPlot('LinePlot', DataforLinePlot, layout, config)
if (this.firstTime == 0) {
EventBus.$emit('emittedEventCallingReally')
this.firstTime = 1
}
}
},
mounted() {
EventBus.$on('updateFlagForFinalResults', data => { this.firstTime = data})
EventBus.$on('emittedEventCallingLinePlot', data => {
this.FinalResultsforLinePlot = data})
EventBus.$on('emittedEventCallingLinePlot', this.LinePlotView)

@ -434,7 +434,6 @@ export default {
}
finalresults.push(results)
}
console.log(finalresults)
EventBus.$emit('flagLocal', true)
EventBus.$emit('sendSelectedFeaturestoPickle', finalresults)
EventBus.$emit('SendSelectedFeaturesEvent', finalresults)

@ -17,7 +17,7 @@
</b-col>
<b-col cols="6">
<mdb-card>
<mdb-card-header color="primary-color" tag="h5" class="text-center" style="background-color: #C0C0C0;"><small class="float-left"><knowledge/></small>History of the Stacking Ensemble<small class="float-right"><active/></small></mdb-card-header>
<mdb-card-header color="primary-color" tag="h5" class="text-center" style="background-color: #C0C0C0;">History of the Stacking Ensemble<small class="float-right"><knowledge/></small></mdb-card-header>
<mdb-card-body>
<Provenance/>
</mdb-card-body>
@ -98,7 +98,7 @@
</b-col>
<b-col cols="6">
<mdb-card style="margin-top: 15px;">
<mdb-card-header color="primary-color" tag="h5" class="text-center">Features Selection for Each Model</mdb-card-header>
<mdb-card-header color="primary-color" tag="h5" class="text-center">Features Selection for Each Model<small class="float-right"><active/></small></mdb-card-header>
<mdb-card-body>
<mdb-card-text class="text-center" style="min-height: 845px">
<ToggleSelection/>
@ -407,6 +407,7 @@ export default Vue.extend({
this.OverSelLength = 0
EventBus.$emit('resetViews')
} else {
this.OverSelLength = this.ClassifierIDsList.length
const path = `http://127.0.0.1:5000/data/ServerRequestSelPoin`
const postData = {
ClassifiersList: this.ClassifierIDsList,
@ -423,7 +424,6 @@ export default Vue.extend({
axios.post(path, postData, axiosConfig)
.then(response => {
console.log('Sent the selected points to the server (scatterplot)!')
this.OverSelLength = this.ClassifierIDsList.length
if (this.keyNow == 0) {
this.OverAllLength = this.ClassifierIDsList.length
EventBus.$emit('GrayOutPoints', this.ClassifierIDsList)
@ -438,7 +438,7 @@ export default Vue.extend({
},
RemoveFromStackModels () {
const path = `http://127.0.0.1:5000/data/ServerRemoveFromStack`
console.log(this.ClassifierIDsList)
const postData = {
ClassifiersList: this.ClassifierIDsList
}
@ -453,6 +453,7 @@ export default Vue.extend({
axios.post(path, postData, axiosConfig)
.then(response => {
console.log('Sent the selected points to the server (scatterplot)!')
EventBus.$emit('updateFlagForFinalResults', 0)
this.getFinalResults()
this.updatePredictionsSpace()
})
@ -700,6 +701,7 @@ export default Vue.extend({
},
UpdateBasedonFeatures () {
const path = `http://127.0.0.1:5000/data/FeaturesSelection`
console.log(this.SelectedFeaturesPerClassifier)
const postData = {
featureSelection: this.SelectedFeaturesPerClassifier
}
@ -942,6 +944,7 @@ export default Vue.extend({
window.addEventListener('resize', this.change)
},
mounted() {
this.Alg()
var modal = document.getElementById('myModal')
window.onclick = function(event) {
@ -972,7 +975,7 @@ export default Vue.extend({
EventBus.$on('SendSelectedDataPointsToServerEvent', data => { this.DataPointsSel = data })
EventBus.$on('SendSelectedDataPointsToServerEvent', this.SendSelectedDataPointsToServer)
EventBus.$on('SendSelectedFeaturesEvent', data => { this.SelectedFeaturesPerClassifier = data })
EventBus.$on('SendSelectedFeaturesEvent', this.UpdateBasedonFeatures )
EventBus.$on('sendToServerFeatures', this.UpdateBasedonFeatures)
EventBus.$on('SendToServerDataSetConfirmation', data => { this.RetrieveValueFile = data })
EventBus.$on('SendToServerLocalFile', data => { this.localFile = data })
EventBus.$on('SendToServerLocalFile', this.SendToServerData)

@ -29,7 +29,6 @@ export default {
d3.selectAll("#PCPDataView > *").remove();
const DataSetNew = JSON.parse(this.PCPDataReceived[2])
var DataSetParse = JSON.parse(DataSetNew)
this.ClassifierIDsListClearedData = DataSetParse.slice();
const target_names = JSON.parse(this.PCPDataReceived[3])
const target_names_original = JSON.parse(this.PCPDataReceived[4])
@ -41,8 +40,10 @@ export default {
EventBus.$emit('sendDatatoPickle', extraction)
var highlighted = []
for (let i = 0; i < this.ClassifierIDsListClearedData.length; i++) {
highlighted.push(DataSetParse[i])
for (let i = 0; i < DataSetParse.length; i++) {
if (this.ClassifierIDsListClearedData.includes(i)) {
highlighted[i] = DataSetParse[i]
}
}
if (DataSetParse.length == this.ClassifierIDsListClearedData.length || this.ClassifierIDsListClearedData.length == 0)

@ -674,7 +674,7 @@ export default {
//////////////////////////////////////////////////////////////
var color = d3.scale.ordinal()
.range(["#ffed6f","#008080"]);
.range(["#ffed6f","#000000"]);
var radarChartOptions = {
w: width,
@ -722,7 +722,7 @@ export default {
mounted () {
EventBus.$on('updateFlagKNN', data => { this.FlagKNN = data })
EventBus.$on('updateFlagSVC', data => { this.FlagSVC = data })
EventBus.$on('updateFlagGausNB', data => { this.FlagGausNB = data })
EventBus.$on('updateFlagGauNB', data => { this.FlagGausNB = data })
EventBus.$on('updateFlagMLP', data => { this.FlagMLP = data })
EventBus.$on('updateFlagLR', data => { this.FlagLR = data })
EventBus.$on('updateFlagLDA', data => { this.FlagLDA = data })
@ -736,7 +736,7 @@ export default {
EventBus.$on('updateFlagKNN', this.overview)
EventBus.$on('updateFlagSVC', this.overview)
EventBus.$on('updateFlagGausNB', this.overview)
EventBus.$on('updateFlagGauNB', this.overview)
EventBus.$on('updateFlagMLP', this.overview)
EventBus.$on('updateFlagLR', this.overview)
EventBus.$on('updateFlagLDA', this.overview)

@ -81,33 +81,33 @@ export default {
};
var data = [trace1, trace2];
var layout = {
font: { family: 'Helvetica', size: 14, color: '#000000' },
boxmode: 'group',
autosize: true,
width: width,
height: height,
hovermode: 'x',
font: { family: 'Helvetica', size: 14, color: '#000000' },
margin: {
l: 50,
r: 0,
b: 30,
b: 35,
t: 40,
pad: 0
},
xaxis: {
title: 'Performance Metrics',
titlefont: {
size: 12,
size: 16,
color: 'black'
}},
yaxis: {
title: '# Performance (%) #',
titlefont: {
size: 12,
size: 16,
color: 'black'
}}};
var boxPlot = document.getElementById('PerMetricBar');
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(boxPlot, data, layout, config);
boxPlot.on('plotly_click', (eventData) => {

@ -75,6 +75,20 @@ export default {
var Xaxs = [];
var Yaxs = [];
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])
@ -113,7 +127,7 @@ export default {
}
layout = {font: { family: 'Helvetica', size: 14, color: '#000000' },
title: 'MDS Projection',
xaxis: {
visible: false
},
@ -125,6 +139,7 @@ export default {
autosize: true,
width: width,
height: height,
legend: {orientation: 'h', xanchor: 'center', x: 0.5},
margin: {
l: 50,
r: 0,
@ -180,7 +195,7 @@ export default {
}
layout = {font: { family: 'Helvetica', size: 14, color: '#000000' },
title: 't-SNE Projection',
xaxis: {
visible: false
},
@ -192,6 +207,7 @@ export default {
autosize: true,
width: width,
height: height,
legend: {orientation: 'h', xanchor: 'center', x: 0.5},
margin: {
l: 50,
r: 0,
@ -212,20 +228,6 @@ export default {
var traces = []
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]);
@ -251,13 +253,14 @@ export default {
}
layout = {font: { family: 'Helvetica', size: 14, color: '#000000' },
title: 'UMAP Projection',
xaxis: {
visible: false
},
yaxis: {
visible: false
},
legend: {orientation: 'h', xanchor: 'center', x: 0.5},
dragmode: 'lasso',
hovermode: "closest",
autosize: true,

@ -1,8 +1,8 @@
<template>
<div>
<div class="squares-container" style="min-height: 364px;">
<div class="squares-container" style="min-height: 374px;">
<div id="tooltip"></div> <!-- new -->
<div id="performanceCapture" style="min-height: 150px;"></div> <!-- new -->
<div id="performanceCapture" style="min-height: 150px; margin-top: -10px !important;"></div> <!-- new -->
<canvas id="main-canvas" style="overflow-y: auto; height:190px;"></canvas>
<br>
<div id="dynamic-buttons"></div>
@ -13,6 +13,10 @@
<script>
import { EventBus } from '../main.js'
import $ from 'jquery'
import * as d3Base from 'd3'
// attach all d3 plugins to the d3 library
const d3v5 = Object.assign(d3Base)
import * as Stardust from 'stardust-core'
import * as StardustGL from 'stardust-webgl'
@ -43,7 +47,13 @@ export default {
storeData: [],
storePerformance: [],
storeParameters: [],
flagUpdated: 0
flagUpdated: 0,
FinalResultsProv: [],
Stack_scoresMean: [],
Stack_scoresMean2: [],
Stack_scoresMean3: [],
Stack_scoresMean4: [],
firstInside: 0
}
},
methods: {
@ -54,6 +64,8 @@ export default {
$('.dynamic_buttons').remove();
this.platform.clear();
}
var svg = d3.select("#performanceCapture");
svg.selectAll("*").remove();
},
clean(obj) {
var propNames = Object.getOwnPropertyNames(obj);
@ -66,8 +78,8 @@ export default {
},
provenance () {
var canvas = document.getElementById("main-canvas");
var width = this.WH[0]*4 // interactive visualization
var height = this.WH[1]*0.58 // interactive visualization
var width = this.WH[0]*3.5 // interactive visualization
var height = this.WH[1]*0.375 // interactive visualization
var flagKNN = 0
var flagSVC = 0
@ -83,7 +95,6 @@ export default {
var localStackStore = []
var StackInfo = JSON.parse(this.stackInformation[1])
console.log(StackInfo)
var arrayOfNumbers = StackInfo.map(Number)
this.storeData.push(arrayOfNumbers)
localStackStore = this.storeData.slice()
@ -209,9 +220,7 @@ export default {
this.data.forEach(d => {
if (d.column == this.counter) {
d.typeIndex = this.typeCounter[d.type]++;
console.log(d.typeIndex)
d.typeColumnIndex = this.typeColumnCounter[d.column]++;
console.log(d.typeColumnIndex)
}
});
@ -227,8 +236,8 @@ export default {
// here 10 was 5!
let pScale = Stardust.scale.custom(`
Vector2(
20 + column * 100 + typeColumnIndex % 5 * 8,
height - 10 - floor(typeColumnIndex / 5) * 10
20 + column * 195 + typeColumnIndex % 12 * 11.7,
height - 10 - floor(typeColumnIndex / 12) * 10
)
`);
pScale.attr("typeColumnIndex", d => d.typeColumnIndex);
@ -239,8 +248,8 @@ export default {
let qScale = Stardust.scale.custom(`
Vector2(
65 + typeIndex % 30 * 8,
height - 10 - floor(typeIndex / 15) * 18
60 + typeIndex % 30 * 8,
height - 10 - floor(typeIndex / 15) * 40
)
`);
qScale.attr("typeIndex", d => d.typeIndex);
@ -314,7 +323,7 @@ export default {
.style('opacity', 0.8)
.style('top', x + 5 + 'px')
.style('left', y + 5 + 'px')
.html('Model ID: '+mergedIDs[p[1]]+'<br>'+'Parameters: '+JSON.stringify(mergedParams[p[1]])+'<br> # Performance (%) #: '+mergedPerf[p[1]]);
.html('Model ID: '+mergedIDs[p[1]]+'<br>'+'Parameters: '+JSON.stringify(mergedParams[p[1]])+'<br> # Performance (%) #: '+mergedPerf[p[1]].toFixed(2));
} else {
@ -325,8 +334,11 @@ export default {
}
}
const stringStep = "Stack Ensemble"
const stringStep = "Stacking Ensemble "
var myButton = '<button id="HistoryReturnButtons'+this.counter+'" class="dynamic_buttons">'+stringStep+this.counter+'</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
var svgs = '<svg id=svg'+this.counter+'></svg>'
this.firstInside = this.counter
$("#performanceCapture").append(svgs);
$("#dynamic-buttons").append(myButton);
EventBus.$emit('requestProven',this.counter-1)
@ -352,103 +364,111 @@ export default {
EventBus.$emit('ChangeKey', 0)
}
);
var width = 150;
var arcSize = (6 * width / 100);
var innerRadius = arcSize * 3;
var data = [
{value: 45, label: "Accuracy", color: '#ff0000'},
{value: 33, label: "Precision", color: '#00ff00'},
{value: 66, label: "Recall", color: '#0000ff'},
{value: 50, label: "F1 Score", color: '#ffff00'}
];
function render() {
var svg = d3.select('#performanceCapture').append('svg').attr('width', width).attr('height', width);
var arcs = data.map(function (obj, i) {
return d3.svg.arc().innerRadius(i * arcSize + innerRadius).outerRadius((i + 1) * arcSize - (width / 100) + innerRadius);
});
var arcsGrey = data.map(function (obj, i) {
return d3.svg.arc().innerRadius(i * arcSize + (innerRadius + ((arcSize / 2) - 2))).outerRadius((i + 1) * arcSize - ((arcSize / 2)) + (innerRadius));
});
var pieData = data.map(function (obj, i) {
return [
{value: obj.value * 0.75, arc: arcs[i], object: obj},
{value: (100 - obj.value) * 0.75, arc: arcsGrey[i], object: obj},
{value: 100 * 0.25, arc: arcs[i], object: obj}];
});
var pie = d3.layout.pie().sort(null).value(function (d) {
return d.value;
});
var g = svg.selectAll('g').data(pieData).enter()
.append('g')
.attr('transform', 'translate(' + width / 2 + ',' + width / 2 + ') rotate(180)');
var gText = svg.selectAll('g.textClass').data([{}]).enter()
.append('g')
.classed('textClass', true)
.attr('transform', 'translate(' + width / 2 + ',' + width / 2 + ') rotate(180)');
g.selectAll('path').data(function (d) {
return pie(d);
}).enter().append('path')
.attr('id', function (d, i) {
if (i == 1) {
return "Text" + d.data.object.label
}
})
.attr('d', function (d) {
return d.data.arc(d);
}).attr('fill', function (d, i) {
return i == 0 ? d.data.object.color : i == 1 ? '#D3D3D3' : 'none';
});
svg.selectAll('g').each(function (d, index) {
var el = d3.select(this);
var path = el.selectAll('path').each(function (r, i) {
if (i === 1) {
var centroid = r.data.arc.centroid({
startAngle: r.startAngle + 0.05,
endAngle: r.startAngle + 0.001 + 0.05
});
var lableObj = r.data.object;
g.append('text')
.attr('font-size', ((5 * width) / 100))
.attr('dominant-baseline', 'central')
/*.attr('transform', "translate(" + centroid[0] + "," + (centroid[1] + 10) + ") rotate(" + (180 / Math.PI * r.startAngle + 7) + ")")
.attr('alignment-baseline', 'middle')*/
.append("textPath")
.attr("textLength", function (d, i) {
return 0;
})
.attr("xlink:href", "#Text" + r.data.object.label)
.attr("startOffset", '5')
.attr("dy", '-3em')
.text(lableObj.value + '%');
}
if (i === 0) {
var centroidText = r.data.arc.centroid({
startAngle: r.startAngle,
endAngle: r.startAngle
});
var lableObj = r.data.object;
gText.append('text')
.attr('font-size', ((5 * width) / 100))
.text(lableObj.label)
.attr('transform', "translate(" + (centroidText[0] - ((1.5 * width) / 100)) + "," + (centroidText[1] + ") rotate(" + (180) + ")"))
.attr('dominant-baseline', 'central');
}
});
});
}
render()
},
RadialPerf () {
var width = 160;
var arcSize = (6 * width / 100);
var innerRadius = arcSize * 3;
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsProv[8])*100).toFixed(0))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsProv[10])*100).toFixed(0))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsProv[12])*100).toFixed(0))
this.Stack_scoresMean4.push((JSON.parse(this.FinalResultsProv[14])*100).toFixed(0))
const colorsSingle = ['#fc9272','#fb6a4a','#ef3b2c','#cb181d','#a50f15','#67000d']
var scaleColor = d3v5.scaleLinear()
.domain([0,100,5])
.range(colorsSingle)
.interpolate(d3v5.interpolateRgb); //interpolateHsl interpolateHcl interpolateRgb;
var data = [
{value: this.Stack_scoresMean, label: "Accuracy", color: scaleColor(this.Stack_scoresMean)},
{value: this.Stack_scoresMean2, label: "Precision", color: scaleColor(this.Stack_scoresMean2)},
{value: this.Stack_scoresMean3, label: "Recall", color: scaleColor(this.Stack_scoresMean3)},
{value: this.Stack_scoresMean4, label: "F1 Score", color: scaleColor(this.Stack_scoresMean4)}
];
var svg = d3.select('#svg'+this.firstInside).attr('width', width).attr('height', width).style('margin-right', '20px');
var arcs = data.map(function (obj, i) {
return d3.svg.arc().innerRadius(i * arcSize + innerRadius).outerRadius((i + 1) * arcSize - (width / 100) + innerRadius);
});
var arcsGrey = data.map(function (obj, i) {
return d3.svg.arc().innerRadius(i * arcSize + (innerRadius + ((arcSize / 2) - 2))).outerRadius((i + 1) * arcSize - ((arcSize / 2)) + (innerRadius));
});
var pieData = data.map(function (obj, i) {
return [
{value: obj.value * 0.75, arc: arcs[i], object: obj},
{value: (100 - obj.value) * 0.75, arc: arcsGrey[i], object: obj},
{value: 100 * 0.25, arc: arcs[i], object: obj}];
});
var pie = d3.layout.pie().sort(null).value(function (d) {
return d.value;
});
var g = svg.selectAll('g').data(pieData).enter()
.append('g')
.attr('transform', 'translate(' + width / 2 + ',' + width / 2 + ') rotate(180)');
var gText = svg.selectAll('g.textClass').data([{}]).enter()
.append('g')
.classed('textClass', true)
.attr('transform', 'translate(' + width / 2 + ',' + width / 2 + ') rotate(180)');
g.selectAll('path').data(function (d) {
return pie(d);
}).enter().append('path')
.attr('id', function (d, i) {
if (i == 1) {
return "Text" + d.data.object.label
}
})
.attr('d', function (d) {
return d.data.arc(d);
}).attr('fill', function (d, i) {
return i == 0 ? d.data.object.color : i == 1 ? '#D3D3D3' : 'none';
});
svg.selectAll('g').each(function (d, index) {
var el = d3.select(this);
var path = el.selectAll('path').each(function (r, i) {
if (i === 1) {
var centroid = r.data.arc.centroid({
startAngle: r.startAngle + 0.05,
endAngle: r.startAngle + 0.001 + 0.05
});
var lableObj = r.data.object;
g.append('text')
.attr('font-size', ((5 * width) / 100) + 2)
.attr('dominant-baseline', 'central')
/*.attr('transform', "translate(" + centroid[0] + "," + (centroid[1] + 10) + ") rotate(" + (180 / Math.PI * r.startAngle + 7) + ")")
.attr('alignment-baseline', 'middle')*/
.append("textPath")
.attr("textLength", function (d, i) {
return 0;
})
.attr("xlink:href", "#Text" + r.data.object.label)
.attr("startOffset", '5')
.attr("dy", '-3em')
.text(lableObj.value + '%');
}
if (i === 0) {
var centroidText = r.data.arc.centroid({
startAngle: r.startAngle,
endAngle: r.startAngle
});
var lableObj = r.data.object;
gText.append('text')
.attr('font-size', ((5 * width) / 100) + 2)
.text(lableObj.label)
.attr('transform', "translate(" + (centroidText[0] - ((1.5 * width) / 100)) + "," + (centroidText[1] + ") rotate(" + (180) + ")"))
.attr('dominant-baseline', 'central');
}
});
});
},
updateExtraction () {
EventBus.$emit('SendSelectedPointsToServerEvent', this.storeData[this.flagUpdated])
@ -464,6 +484,10 @@ export default {
}
},
mounted () {
EventBus.$on('emittedEventCallingLinePlot', data => {
this.FinalResultsProv = data})
EventBus.$on('emittedEventCallingReally', this.RadialPerf)
EventBus.$on('requestProven', data => {
this.flagUpdated = data})
EventBus.$on('requestProven', this.updateExtraction)
@ -471,6 +495,7 @@ export default {
EventBus.$on('ParametersProvenance', data => {this.AllDetails = data})
EventBus.$on('InitializeProvenance', data => {this.stackInformation = data})
EventBus.$on('InitializeProvenance', this.provenance)
EventBus.$on('Responsive', data => {
this.WH = data})
EventBus.$on('ResponsiveandChange', data => {

@ -236,7 +236,7 @@ export default {
}]
layout = {
title: 'MDS Projection',
xaxis: {
visible: false,
range: [minX, maxX]
@ -298,7 +298,7 @@ export default {
}
}]
layout = {
title: 't-SNE Projection',
xaxis: {
visible: false,
range: [minX, maxX]
@ -351,7 +351,7 @@ export default {
}]
layout = {
title: 'UMAP Projection',
xaxis: {
visible: false,
range: [minX, maxX]
@ -389,8 +389,8 @@ export default {
const OverviewPlotly = document.getElementById('OverviewPlotly')
var allModels = JSON.parse(this.ScatterPlotResults[13])
OverviewPlotly.on('plotly_selected', function (evt) {
this.pushModelsRemaining = []
if (typeof evt !== 'undefined') {
var pushModelsRemainingTemp = []
const ClassifierIDsList = []
const ClassifierIDsListCleared = []
for (let i = 0; evt.points.length; i++) {
@ -400,17 +400,16 @@ export default {
const OnlyId = evt.points[i].text.split(' ')[2]
const OnlyIdCleared = OnlyId.split('<br>')
ClassifierIDsList.push(OnlyIdCleared[0])
let numb = OnlyIdCleared[0].match(/\d/g);
numb = numb.join("");
let numberNumb = Number(numb)
let numberNumb = parseInt(OnlyIdCleared[0])
ClassifierIDsListCleared.push(numberNumb)
}
}
for (let i = 0; i < allModels.length; i++) {
if (!ClassifierIDsListCleared.includes(allModels[i])) {
this.pushModelsRemaining.push(allModels[i])
pushModelsRemainingTemp.push(allModels[i])
}
}
EventBus.$emit('updateRemaining', pushModelsRemainingTemp)
if (allModels != '') {
EventBus.$emit('ChangeKey', 1)
EventBus.$emit('SendSelectedPointsToServerEvent', ClassifierIDsListCleared)
@ -470,8 +469,9 @@ export default {
mounted() {
/*EventBus.$on('updateMetricsScatter', data => { this.newColorsUpdate = data })
EventBus.$on('updateMetricsScatter', this.ScatterPlotView)*/
EventBus.$on('updateRemaining', data => { this.pushModelsRemaining = data })
EventBus.$on('requestProven',data => { this.activeModels = data })
EventBus.$on('requestProven', data => { this.activeModels = data })
EventBus.$on('sendKeyScatt', data => { this.keyLocal = data })

@ -25,11 +25,6 @@ export default {
$(this).bootstrapToggle('on'); //you can set "on" or "off"
});
},
ToggleSelection () {
},
ToggleShow () {
document.getElementById('toggles').style.visibility = "visible"
},
ToggleManage () {
if(this.toggleDeepLocal == 0) {
document.getElementById('toggles').style.visibility = "hidden"
@ -39,6 +34,7 @@ export default {
}
},
mounted () {
this.ToggleManage()
EventBus.$on('toggleDeep', data => {this.toggleDeepLocal = data})
EventBus.$on('toggleDeep', this.ToggleManage)

@ -328,8 +328,6 @@ def SendToServerData():
global XDataStored, yDataStored
XDataStored = XData.copy()
yDataStored = yData.copy()
callPreResults()
return 'Processed uploaded data set'
@ -1513,6 +1511,8 @@ def InitializeEnsemble():
impDataInst = processDataInstance(ModelsIDs,allParametersPerformancePerModel)
callPreResults()
key = 0
EnsembleModel(ModelsIDs, key)
@ -1520,16 +1520,27 @@ def InitializeEnsemble():
def processDataInstance(ModelsIDs, allParametersPerformancePerModel):
dicKNN = json.loads(allParametersPerformancePerModel[8])
dicKNN = json.loads(dicKNN)
dicSVC = json.loads(allParametersPerformancePerModel[17])
dicSVC = json.loads(dicSVC)
dicGausNB = json.loads(allParametersPerformancePerModel[26])
dicGausNB = json.loads(dicGausNB)
dicMLP = json.loads(allParametersPerformancePerModel[35])
dicMLP = json.loads(dicMLP)
dicLR = json.loads(allParametersPerformancePerModel[44])
dicLR = json.loads(dicLR)
dicLDA = json.loads(allParametersPerformancePerModel[53])
dicLDA = json.loads(dicLDA)
dicQDA = json.loads(allParametersPerformancePerModel[62])
dicQDA = json.loads(dicQDA)
dicRF = json.loads(allParametersPerformancePerModel[71])
dicExtraT = json.loads(allParametersPerformancePerModel[70])
dicRF = json.loads(dicRF)
dicExtraT = json.loads(allParametersPerformancePerModel[80])
dicExtraT = json.loads(dicExtraT)
dicAdaB = json.loads(allParametersPerformancePerModel[89])
dicAdaB = json.loads(dicAdaB)
dicGradB = json.loads(allParametersPerformancePerModel[98])
dicGradB = json.loads(dicGradB)
dfKNN = pd.DataFrame.from_dict(dicKNN)
dfSVC = pd.DataFrame.from_dict(dicSVC)
@ -1568,8 +1579,17 @@ def processDataInstance(ModelsIDs, allParametersPerformancePerModel):
dfGradBFiltered = dfGradB.loc[GradBModels, :]
df_connect = pd.concat([dfKNNFiltered, dfSVCFiltered, dfGausNBFiltered, dfMLPFiltered, dfLRFiltered, dfLDAFiltered, dfQDAFiltered, dfRFFiltered, dfExtraTFiltered, dfAdaBFiltered, dfGradBFiltered])
print(df_connect.sum(axis=1))
return df_connect
global yData
countCorrect = []
length = len(df_connect.index)
for index, element in enumerate(yData):
countTemp = 0
dfPart = df_connect[[str(index)]]
for indexdf, row in dfPart.iterrows():
if (int(row.values[0]) == int(element)):
countTemp += 1
countCorrect.append(1 - (countTemp/length))
return countCorrect
def ReturnResults(ModelSpaceMDS,ModelSpaceTSNE,ModelSpaceUMAP,PredictionSpaceMDS,PredictionSpaceTSNE,PredictionSpaceUMAP):
@ -1637,6 +1657,8 @@ def RetrieveSelClassifiersIDandRemoveFromStack():
ClassifierIDsList = request.get_data().decode('utf8').replace("'", '"')
PredictionProbSelUpdate = PreprocessingPredUpdate(ClassifierIDsList)
print(ClassifierIDsList)
print(PredictionProbSelUpdate)
global resultsUpdatePredictionSpace
resultsUpdatePredictionSpace = []

Loading…
Cancel
Save