StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
StackGenVis/frontend/src/components/AlgorithmHyperParam.vue

357 lines
35 KiB

6 years ago
<template>
5 years ago
<div id="PCP" class="parcoords" style="min-height: 307px;"></div>
6 years ago
</template>
<script>
import 'parcoord-es/dist/parcoords.css';
import ParCoords from 'parcoord-es';
import * as d3Base from 'd3'
// attach all d3 plugins to the d3 library
const d3 = Object.assign(d3Base)
import { EventBus } from '../main.js'
export default {
name: 'AlgorithmHyperParam',
data () {
return {
ModelsPerformance: 0,
selAlgorithm: 0,
keyAllOrClass: true,
listClassPerf: [],
6 years ago
pc: 0,
factors: [1,0,0
5 years ago
,1,0,0,1,0
,0,1,0,0,0
,0,0,1,0,0
,0,1,1,1
],
5 years ago
SVCModels: 576,
GausNBModels: 736,
MLPModels: 1236,
LRModels: 1356,
LDAModels: 1996,
QDAModels: 2196,
RFModels: 2446,
ExtraTModels: 2606,
AdaBModels: 2766,
GradBModels: 2926,
6 years ago
}
},
methods: {
5 years ago
reset () {
d3.selectAll("#PCP > *").remove();
},
6 years ago
PCPView () {
6 years ago
d3.selectAll("#PCP > *").remove();
if (this.selAlgorithm != '') {
5 years ago
var colors = ['#a6cee3','#1f78b4','#b2df8a','#33a02c','#fb9a99','#e31a1c','#fdbf6f','#ff7f00','#cab2d6','#6a3d9a','#b15928']
6 years ago
var colorGiv = 0
5 years ago
var factorsLocal = this.factors
var divide = 0
factorsLocal.forEach(element => {
divide = element + divide
});
5 years ago
var McKNN = []
const performanceAlgKNN = JSON.parse(this.ModelsPerformance[6])
for (let j = 0; j < Object.values(performanceAlgKNN['mean_test_accuracy']).length; j++) {
let sumKNN
sumKNN = (factorsLocal[0] * Object.values(performanceAlgKNN['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgKNN['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgKNN['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgKNN['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgKNN['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgKNN['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgKNN['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgKNN['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgKNN['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgKNN['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgKNN['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgKNN['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgKNN['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgKNN['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgKNN['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgKNN['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgKNN['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgKNN['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgKNN['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgKNN['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgKNN['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgKNN['log_loss'])[j]))
5 years ago
McKNN.push((sumKNN/divide)*100)
5 years ago
}
5 years ago
var McSVC = []
5 years ago
const performanceAlgSVC = JSON.parse(this.ModelsPerformance[15])
5 years ago
for (let j = 0; j < Object.values(performanceAlgSVC['mean_test_accuracy']).length; j++) {
let sumSVC
sumSVC = (factorsLocal[0] * Object.values(performanceAlgSVC['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgSVC['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgSVC['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgSVC['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgSVC['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgSVC['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgSVC['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgSVC['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgSVC['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgSVC['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgSVC['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgSVC['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgSVC['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgSVC['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgSVC['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgSVC['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgSVC['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgSVC['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgSVC['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgSVC['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgSVC['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgSVC['log_loss'])[j]))
5 years ago
McSVC.push((sumSVC/divide)*100)
}
var McGausNB = []
5 years ago
const performanceAlgGausNB = JSON.parse(this.ModelsPerformance[24])
5 years ago
for (let j = 0; j < Object.values(performanceAlgGausNB['mean_test_accuracy']).length; j++) {
let sumGausNB
sumGausNB = (factorsLocal[0] * Object.values(performanceAlgGausNB['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgGausNB['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgGausNB['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgGausNB['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgGausNB['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgGausNB['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgGausNB['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgGausNB['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgGausNB['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgGausNB['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgGausNB['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgGausNB['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgGausNB['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgGausNB['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgGausNB['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgGausNB['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgGausNB['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgGausNB['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgGausNB['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgGausNB['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgGausNB['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgGausNB['log_loss'])[j]))
5 years ago
McGausNB.push((sumGausNB/divide)*100)
}
var McMLP = []
5 years ago
const performanceAlgMLP = JSON.parse(this.ModelsPerformance[33])
5 years ago
for (let j = 0; j < Object.values(performanceAlgMLP['mean_test_accuracy']).length; j++) {
let sumMLP
sumMLP = (factorsLocal[0] * Object.values(performanceAlgMLP['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgMLP['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgMLP['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgMLP['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgMLP['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgMLP['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgMLP['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgMLP['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgMLP['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgMLP['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgMLP['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgMLP['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgMLP['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgMLP['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgMLP['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgMLP['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgMLP['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgMLP['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgMLP['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgMLP['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgMLP['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgMLP['log_loss'])[j]))
5 years ago
McMLP.push((sumMLP/divide)*100)
}
var McLR = []
5 years ago
const performanceAlgLR = JSON.parse(this.ModelsPerformance[42])
5 years ago
for (let j = 0; j < Object.values(performanceAlgLR['mean_test_accuracy']).length; j++) {
let sumLR
sumLR = (factorsLocal[0] * Object.values(performanceAlgLR['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgLR['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgLR['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgLR['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgLR['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgLR['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgLR['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgLR['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgLR['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgLR['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgLR['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgLR['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgLR['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgLR['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgLR['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgLR['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgLR['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgLR['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgLR['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgLR['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgLR['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgLR['log_loss'])[j]))
5 years ago
McLR.push((sumLR/divide)*100)
}
var McLDA = []
5 years ago
const performanceAlgLDA = JSON.parse(this.ModelsPerformance[51])
5 years ago
for (let j = 0; j < Object.values(performanceAlgLDA['mean_test_accuracy']).length; j++) {
let sumLDA
sumLDA = (factorsLocal[0] * Object.values(performanceAlgLDA['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgLDA['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgLDA['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgLDA['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgLDA['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgLDA['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgLDA['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgLDA['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgLDA['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgLDA['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgLDA['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgLDA['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgLDA['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgLDA['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgLDA['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgLDA['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgLDA['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgLDA['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgLDA['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgLDA['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgLDA['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgLDA['log_loss'])[j]))
5 years ago
McLDA.push((sumLDA/divide)*100)
}
var McQDA = []
5 years ago
const performanceAlgQDA = JSON.parse(this.ModelsPerformance[60])
5 years ago
for (let j = 0; j < Object.values(performanceAlgQDA['mean_test_accuracy']).length; j++) {
let sumQDA
sumQDA = (factorsLocal[0] * Object.values(performanceAlgQDA['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgQDA['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgQDA['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgQDA['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgQDA['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgQDA['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgQDA['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgQDA['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgQDA['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgQDA['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgQDA['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgQDA['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgQDA['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgQDA['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgQDA['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgQDA['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgQDA['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgQDA['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgQDA['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgQDA['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgQDA['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgQDA['log_loss'])[j]))
5 years ago
McQDA.push((sumQDA/divide)*100)
}
var McRF = []
5 years ago
const performanceAlgRF = JSON.parse(this.ModelsPerformance[69])
5 years ago
for (let j = 0; j < Object.values(performanceAlgRF['mean_test_accuracy']).length; j++) {
let sumRF
sumRF = (factorsLocal[0] * Object.values(performanceAlgRF['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgRF['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgRF['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgRF['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgRF['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgRF['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgRF['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgRF['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgRF['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgRF['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgRF['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgRF['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgRF['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgRF['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgRF['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgRF['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgRF['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgRF['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgRF['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgRF['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgRF['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgRF['log_loss'])[j]))
5 years ago
McRF.push((sumRF/divide)*100)
}
var McExtraT = []
5 years ago
const performanceAlgExtraT = JSON.parse(this.ModelsPerformance[78])
5 years ago
for (let j = 0; j < Object.values(performanceAlgExtraT['mean_test_accuracy']).length; j++) {
let sumExtraT
sumExtraT = (factorsLocal[0] * Object.values(performanceAlgExtraT['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgExtraT['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgExtraT['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgExtraT['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgExtraT['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgExtraT['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgExtraT['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgExtraT['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgExtraT['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgExtraT['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgExtraT['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgExtraT['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgExtraT['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgExtraT['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgExtraT['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgExtraT['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgExtraT['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgExtraT['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgExtraT['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgExtraT['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgExtraT['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgExtraT['log_loss'])[j]))
5 years ago
McExtraT.push((sumExtraT/divide)*100)
}
var McAdaB = []
5 years ago
const performanceAlgAdaB = JSON.parse(this.ModelsPerformance[87])
5 years ago
for (let j = 0; j < Object.values(performanceAlgAdaB['mean_test_accuracy']).length; j++) {
let sumAdaB
sumAdaB = (factorsLocal[0] * Object.values(performanceAlgAdaB['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgAdaB['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgAdaB['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgAdaB['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgAdaB['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgAdaB['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgAdaB['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgAdaB['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgAdaB['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgAdaB['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgAdaB['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgAdaB['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgAdaB['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgAdaB['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgAdaB['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgAdaB['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgAdaB['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgAdaB['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgAdaB['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgAdaB['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgAdaB['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgAdaB['log_loss'])[j]))
5 years ago
McAdaB.push((sumAdaB/divide)*100)
}
var McGradB = []
5 years ago
const performanceAlgGradB = JSON.parse(this.ModelsPerformance[96])
5 years ago
for (let j = 0; j < Object.values(performanceAlgGradB['mean_test_accuracy']).length; j++) {
let sumGradB
sumGradB = (factorsLocal[0] * Object.values(performanceAlgGradB['mean_test_accuracy'])[j]) + (factorsLocal[1] * Object.values(performanceAlgGradB['geometric_mean_score_micro'])[j]) + (factorsLocal[2] * Object.values(performanceAlgGradB['geometric_mean_score_macro'])[j])
+ (factorsLocal[3] * Object.values(performanceAlgGradB['geometric_mean_score_weighted'])[j]) + (factorsLocal[4] * Object.values(performanceAlgGradB['mean_test_precision_micro'])[j]) + (factorsLocal[5] * Object.values(performanceAlgGradB['mean_test_precision_macro'])[j]) + (factorsLocal[6] * Object.values(performanceAlgGradB['mean_test_precision_weighted'])[j]) + (factorsLocal[7] * Object.values(performanceAlgGradB['mean_test_recall_micro'])[j])
+ (factorsLocal[8] * Object.values(performanceAlgGradB['mean_test_recall_macro'])[j]) + (factorsLocal[9] * Object.values(performanceAlgGradB['mean_test_recall_weighted'])[j]) + (factorsLocal[10] * Object.values(performanceAlgGradB['f5_micro'])[j]) + (factorsLocal[11] * Object.values(performanceAlgGradB['f5_macro'])[j]) + (factorsLocal[12] * Object.values(performanceAlgGradB['f5_weighted'])[j]) + (factorsLocal[13] * Object.values(performanceAlgGradB['f1_micro'])[j])
+ (factorsLocal[14] * Object.values(performanceAlgGradB['f1_macro'])[j]) + (factorsLocal[15] * Object.values(performanceAlgGradB['f1_weighted'])[j]) + (factorsLocal[16] * Object.values(performanceAlgGradB['f2_micro'])[j]) + (factorsLocal[17] * Object.values(performanceAlgGradB['f2_macro'])[j]) + (factorsLocal[18] * Object.values(performanceAlgGradB['f2_weighted'])[j]) + (factorsLocal[19] * Math.abs(Object.values(performanceAlgGradB['matthews_corrcoef'])[j]))
+ (factorsLocal[20] * Object.values(performanceAlgGradB['mean_test_roc_auc_ovo_weighted'])[j]) + (factorsLocal[21] * (1 - Object.values(performanceAlgGradB['log_loss'])[j]))
5 years ago
McGradB.push((sumGradB/divide)*100)
5 years ago
}
6 years ago
var Combined = 0
if (this.selAlgorithm == 'KNN') {
6 years ago
Combined = JSON.parse(this.ModelsPerformance[1])
6 years ago
colorGiv = colors[0]
5 years ago
} else if (this.selAlgorithm == 'SVC') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[10])
6 years ago
colorGiv = colors[1]
5 years ago
} else if (this.selAlgorithm == 'GausNB') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[19])
5 years ago
colorGiv = colors[2]
} else if (this.selAlgorithm == 'MLP') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[28])
5 years ago
colorGiv = colors[3]
} else if (this.selAlgorithm == 'LR') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[37])
5 years ago
colorGiv = colors[4]
} else if (this.selAlgorithm == 'LDA') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[46])
5 years ago
colorGiv = colors[5]
} else if (this.selAlgorithm == 'QDA') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[55])
5 years ago
colorGiv = colors[6]
} else if (this.selAlgorithm == 'RF') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[64])
5 years ago
colorGiv = colors[7]
} else if (this.selAlgorithm == 'ExtraT') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[73])
5 years ago
colorGiv = colors[8]
} else if (this.selAlgorithm == 'AdaB') {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[82])
5 years ago
colorGiv = colors[9]
} else {
5 years ago
Combined = JSON.parse(this.ModelsPerformance[91])
5 years ago
colorGiv = colors[10]
6 years ago
}
5 years ago
var valuesPerf = Object.values(Combined['params'])
6 years ago
var ObjectsParams = Combined['params']
5 years ago
var newObjectsParamsΚΝΝ = []
var newObjectsParamsSVC = []
var newObjectsParamsGausNB = []
var newObjectsParamsMLP = []
var newObjectsParamsLR = []
var newObjectsParamsLDA = []
var newObjectsParamsQDA = []
var newObjectsParamsRF = []
var newObjectsParamsExtraT = []
var newObjectsParamsAdaB = []
var newObjectsParamsGradB = []
6 years ago
var ArrayCombined = []
var temp
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})
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})
ArrayCombined[i] = newObjectsParamsSVC[i]
} else if (this.selAlgorithm === 'GausNB') {
newObjectsParamsGausNB.push({model: this.GausNBModels + i,'# Performance (%) #': 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})
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})
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})
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})
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})
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})
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})
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})
ArrayCombined[i] = newObjectsParamsGradB[i]
}
6 years ago
} 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})
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})
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})
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})
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})
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})
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})
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})
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})
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})
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})
ArrayCombined[i] = newObjectsParamsGradB[i]
}
6 years ago
}
6 years ago
}
EventBus.$emit('AllAlModels', ArrayCombined.length)
6 years ago
this.pc = ParCoords()("#PCP")
.data(ArrayCombined)
.color(colorGiv)
.margin({
top: 25,
left: 25,
right: 25,
bottom: 25
})
6 years ago
.hideAxis(['model'])
6 years ago
.bundlingStrength(0) // set bundling strength
.smoothness(0)
.showControlPoints(false)
.render()
.brushMode('1D-axes')
6 years ago
.reorderable()
6 years ago
.interactive();
6 years ago
this.pc.on("brushend", function(d) {
EventBus.$emit('AllSelModels', d.length)
6 years ago
EventBus.$emit('UpdateBoxPlot', d)
});
6 years ago
}
6 years ago
},
sliders () {
6 years ago
},
6 years ago
6 years ago
clear () {
d3.selectAll("#PCP > *").remove();
6 years ago
},
6 years ago
},
mounted() {
6 years ago
EventBus.$on('ReturningBrushedPointsModels', this.brushed)
6 years ago
EventBus.$on('emittedEventCallingModelSelect', data => { this.selAlgorithm = data })
EventBus.$on('emittedEventCallingModel', data => { this.ModelsPerformance = data })
EventBus.$on('emittedEventCallingModel', this.PCPView)
6 years ago
EventBus.$on('ResponsiveandChange', this.PCPView)
6 years ago
EventBus.$on('emittedEventCallingModelClear', this.clear)
5 years ago
5 years ago
EventBus.$on('CallFactorsView', data => { this.factors = data })
EventBus.$on('CallFactorsView', this.PCPView)
EventBus.$on('boxplotSet', data => { this.listClassPerf = data })
EventBus.$on('boxplotCall', data => { this.keyAllOrClass = data })
5 years ago
// reset view
EventBus.$on('resetViews', this.reset)
5 years ago
EventBus.$on('clearPCP', this.reset)
6 years ago
}
}
</script>