|
|
@ -26,7 +26,7 @@ export default { |
|
|
|
var svg = d3.select("#overview"); |
|
|
|
var svg = d3.select("#overview"); |
|
|
|
svg.selectAll("*").remove(); |
|
|
|
svg.selectAll("*").remove(); |
|
|
|
|
|
|
|
|
|
|
|
var widthinter = this.WH[0]*3 // interactive visualization |
|
|
|
var widthinter = this.WH[0]*2 // interactive visualization |
|
|
|
var heightinter = this.WH[1]*1.23 // interactive visualization |
|
|
|
var heightinter = this.WH[1]*1.23 // interactive visualization |
|
|
|
var margin = 0, |
|
|
|
var margin = 0, |
|
|
|
width = widthinter, |
|
|
|
width = widthinter, |
|
|
@ -104,12 +104,31 @@ export default { |
|
|
|
.attr("offset", "100%") |
|
|
|
.attr("offset", "100%") |
|
|
|
.attr("stop-color", "#AF4427"); |
|
|
|
.attr("stop-color", "#AF4427"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gradients = defs |
|
|
|
|
|
|
|
.append("linearGradient") |
|
|
|
|
|
|
|
.attr("id", "gradient-categorization") |
|
|
|
|
|
|
|
.attr("x1", "0%") |
|
|
|
|
|
|
|
.attr("y1", "50%") |
|
|
|
|
|
|
|
.attr("x2", "100%") |
|
|
|
|
|
|
|
.attr("y2", "50%") |
|
|
|
|
|
|
|
.attr("spreadMethod", "pad"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gradients.append("stop") |
|
|
|
|
|
|
|
.attr("offset", "0%") |
|
|
|
|
|
|
|
.attr("stop-color", "#8dd3c7") |
|
|
|
|
|
|
|
.attr("stop-opacity", 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gradients.append("stop") |
|
|
|
|
|
|
|
.attr("offset", "100%") |
|
|
|
|
|
|
|
.attr("stop-color", "#8da0cb") |
|
|
|
|
|
|
|
.attr("stop-opacity", 1); |
|
|
|
|
|
|
|
|
|
|
|
svg.append("circle") |
|
|
|
svg.append("circle") |
|
|
|
.attr("r", maxBarHeight + 70) |
|
|
|
.attr("r", maxBarHeight + 30) |
|
|
|
.classed("category-circle", true); |
|
|
|
.classed("category-circle", true); |
|
|
|
|
|
|
|
|
|
|
|
svg.append("circle") |
|
|
|
svg.append("circle") |
|
|
|
.attr("r", maxBarHeight + 40) |
|
|
|
.attr("r", maxBarHeight + 15) |
|
|
|
.classed("question-circle", true); |
|
|
|
.classed("question-circle", true); |
|
|
|
|
|
|
|
|
|
|
|
svg.append("circle") |
|
|
|
svg.append("circle") |
|
|
@ -119,7 +138,7 @@ export default { |
|
|
|
svg.append("circle") |
|
|
|
svg.append("circle") |
|
|
|
.attr("r", innerRadius) |
|
|
|
.attr("r", innerRadius) |
|
|
|
.classed("center-circle", true); |
|
|
|
.classed("center-circle", true); |
|
|
|
|
|
|
|
|
|
|
|
var n_neighbors = 0 |
|
|
|
var n_neighbors = 0 |
|
|
|
var metric = 0 |
|
|
|
var metric = 0 |
|
|
|
var algorithm = 0 |
|
|
|
var algorithm = 0 |
|
|
@ -149,8 +168,8 @@ export default { |
|
|
|
countRFRelated.push(JSON.parse(this.storeParameters[this.storeActiveModels[i]])) |
|
|
|
countRFRelated.push(JSON.parse(this.storeParameters[this.storeActiveModels[i]])) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(countkNNRelated) |
|
|
|
//console.log(countkNNRelated) |
|
|
|
console.log(countRFRelated) |
|
|
|
//console.log(countRFRelated) |
|
|
|
n_neighbors = ([... new Set(countkNNRelated.map(data => data.n_neighbors))].length / 25) * 100 |
|
|
|
n_neighbors = ([... new Set(countkNNRelated.map(data => data.n_neighbors))].length / 25) * 100 |
|
|
|
metric = ([... new Set(countkNNRelated.map(data => data.metric))].length / 4) * 100 |
|
|
|
metric = ([... new Set(countkNNRelated.map(data => data.metric))].length / 4) * 100 |
|
|
|
algorithm = ([... new Set(countkNNRelated.map(data => data.algorithm))].length / 3) * 100 |
|
|
|
algorithm = ([... new Set(countkNNRelated.map(data => data.algorithm))].length / 3) * 100 |
|
|
@ -158,16 +177,16 @@ export default { |
|
|
|
n_estimators = ([... new Set(countRFRelated.map(data => data.n_estimators))].length / 80) * 100 |
|
|
|
n_estimators = ([... new Set(countRFRelated.map(data => data.n_estimators))].length / 80) * 100 |
|
|
|
criterion = ([... new Set(countRFRelated.map(data => data.criterion))].length / 2) * 100 |
|
|
|
criterion = ([... new Set(countRFRelated.map(data => data.criterion))].length / 2) * 100 |
|
|
|
|
|
|
|
|
|
|
|
console.log(algorithm) |
|
|
|
//console.log(algorithm) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var data = [ |
|
|
|
var data = [ |
|
|
|
|
|
|
|
{ algorithm: 'RF', parameter: 'n_estimators', percentage: n_estimators }, |
|
|
|
|
|
|
|
{ algorithm: 'RF', parameter: 'criterion', percentage: criterion }, |
|
|
|
{ algorithm: 'KNN', parameter: 'n_neighbors', percentage: n_neighbors }, |
|
|
|
{ algorithm: 'KNN', parameter: 'n_neighbors', percentage: n_neighbors }, |
|
|
|
{ algorithm: 'KNN', parameter: 'metric', percentage: metric }, |
|
|
|
{ algorithm: 'KNN', parameter: 'metric', percentage: metric }, |
|
|
|
{ algorithm: 'KNN', parameter: 'algorithm', percentage: algorithm }, |
|
|
|
{ algorithm: 'KNN', parameter: 'algorithm', percentage: algorithm }, |
|
|
|
{ algorithm: 'KNN', parameter: 'weight', percentage: weight }, |
|
|
|
{ algorithm: 'KNN', parameter: 'weight', percentage: weight }, |
|
|
|
{ algorithm: 'RF', parameter: 'n_estimators', percentage: n_estimators }, |
|
|
|
|
|
|
|
{ algorithm: 'RF', parameter: 'criterion', percentage: criterion } |
|
|
|
|
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
var cats = data.map(function(d, i) { |
|
|
|
var cats = data.map(function(d, i) { |
|
|
@ -207,8 +226,8 @@ export default { |
|
|
|
.endAngle(function(d, i) { |
|
|
|
.endAngle(function(d, i) { |
|
|
|
return ((i + 1) * 2 * Math.PI) / numCatBars; |
|
|
|
return ((i + 1) * 2 * Math.PI) / numCatBars; |
|
|
|
}) |
|
|
|
}) |
|
|
|
.innerRadius(maxBarHeight + 40) |
|
|
|
.innerRadius(maxBarHeight + 32) |
|
|
|
.outerRadius(maxBarHeight + 64); |
|
|
|
.outerRadius(maxBarHeight + 0); |
|
|
|
|
|
|
|
|
|
|
|
var category_text = svg.selectAll("path.category_label_arc") |
|
|
|
var category_text = svg.selectAll("path.category_label_arc") |
|
|
|
.data(cats) |
|
|
|
.data(cats) |
|
|
@ -288,7 +307,7 @@ export default { |
|
|
|
return d.endAngle; |
|
|
|
return d.endAngle; |
|
|
|
}) |
|
|
|
}) |
|
|
|
//.innerRadius(maxBarHeight + 2) |
|
|
|
//.innerRadius(maxBarHeight + 2) |
|
|
|
.outerRadius(maxBarHeight + 2); |
|
|
|
.outerRadius(maxBarHeight - 9); |
|
|
|
|
|
|
|
|
|
|
|
var question_text = svg.selectAll("path.parameter_arc") |
|
|
|
var question_text = svg.selectAll("path.parameter_arc") |
|
|
|
.data(data) |
|
|
|
.data(data) |
|
|
@ -426,7 +445,7 @@ export default { |
|
|
|
.enter().append("line") |
|
|
|
.enter().append("line") |
|
|
|
.classed("gridlines minor", true) |
|
|
|
.classed("gridlines minor", true) |
|
|
|
.attr("y1", -innerRadius) |
|
|
|
.attr("y1", -innerRadius) |
|
|
|
.attr("y2", -maxBarHeight - 40) |
|
|
|
.attr("y2", -maxBarHeight - 15) |
|
|
|
.attr("transform", function(d, i) { |
|
|
|
.attr("transform", function(d, i) { |
|
|
|
return "rotate(" + (d.rotate) + ")"; |
|
|
|
return "rotate(" + (d.rotate) + ")"; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -437,7 +456,7 @@ export default { |
|
|
|
.enter().append("line") |
|
|
|
.enter().append("line") |
|
|
|
.classed("gridlines major", true) |
|
|
|
.classed("gridlines major", true) |
|
|
|
.attr("y1", -innerRadius) |
|
|
|
.attr("y1", -innerRadius) |
|
|
|
.attr("y2", -maxBarHeight - 70) |
|
|
|
.attr("y2", -maxBarHeight - 100) |
|
|
|
.attr("transform", function(d, i) { |
|
|
|
.attr("transform", function(d, i) { |
|
|
|
return "rotate(" + (i * 360 / numCatBars) + ")"; |
|
|
|
return "rotate(" + (i * 360 / numCatBars) + ")"; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -518,8 +537,9 @@ export default { |
|
|
|
<style> |
|
|
|
<style> |
|
|
|
/* Styles go here */ |
|
|
|
/* Styles go here */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.category-circle { |
|
|
|
.category-circle { |
|
|
|
fill: #F4A636; |
|
|
|
fill: url(#gradient-categorization); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.question-circle { |
|
|
|
.question-circle { |
|
|
|