master
Angelos Chatzimparmpas 4 years ago
parent 7c673c7155
commit fd57d5dc1c
  1. BIN
      __pycache__/run.cpython-37.pyc
  2. 1
      cachedir/joblib/run/randomSearch/7d87fc60b78f9a8c0f2e5253807d1620/metadata.json
  3. BIN
      cachedir/joblib/run/randomSearch/941802fa78895e1cc419560476f6d7fb/output.pkl
  4. 1
      cachedir/joblib/run/randomSearch/aba5eafe0e7bbd08a063cfe1b27cd2cb/metadata.json
  5. BIN
      cachedir/joblib/run/randomSearch/f06d9640ff5a91a7e97efb76ba44c41e/output.pkl
  6. 8
      frontend/src/components/Ensemble.vue
  7. 681
      frontend/src/components/History.vue
  8. 34
      frontend/src/components/HyperParameterSpace.vue
  9. 15
      frontend/src/components/Main.vue
  10. 7
      frontend/src/components/Predictions.vue
  11. 4
      frontend/src/main.js
  12. 380
      run.py

Binary file not shown.

@ -0,0 +1 @@
{"duration": 70.30437707901001, "input_args": {"XData": " Fbs Slope Trestbps Exang Thalach Age Chol Sex Oldpeak Restecg Cp Ca Thal\n0 1 0 145 0 150 63 233 1 2.3 0 3 0 1\n1 0 0 130 0 187 37 250 1 3.5 1 2 0 2\n2 0 2 130 0 172 41 204 0 1.4 0 1 0 2\n3 0 2 120 0 178 56 236 1 0.8 1 1 0 2\n4 0 2 120 1 163 57 354 0 0.6 1 0 0 2\n.. ... ... ... ... ... ... ... ... ... ... .. .. ...\n298 0 1 140 1 123 57 241 0 0.2 1 0 0 3\n299 0 1 110 0 132 45 264 1 1.2 1 3 0 3\n300 1 1 144 0 141 68 193 1 3.4 1 0 2 3\n301 0 1 130 1 115 57 131 1 1.2 1 0 1 3\n302 0 1 130 0 174 57 236 0 0.0 0 1 1 2\n\n[303 rows x 13 columns]", "yData": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]", "clf": "LogisticRegression(C=65, max_iter=400, penalty='none', random_state=42,\n solver='sag')", "params": "{'C': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99], 'max_iter': [50, 100, 150, 200, 250, 300, 350, 400, 450], 'solver': ['lbfgs', 'newton-cg', 'sag', 'saga'], 'penalty': ['l2', 'none']}", "eachAlgor": "'LR'", "AlgorithmsIDsEnd": "650"}}

@ -0,0 +1 @@
{"duration": 13.653204917907715, "input_args": {"XData": " Fbs Slope Trestbps Exang Thalach Age Chol Sex Oldpeak Restecg Cp Ca Thal\n0 1 0 145 0 150 63 233 1 2.3 0 3 0 1\n1 0 0 130 0 187 37 250 1 3.5 1 2 0 2\n2 0 2 130 0 172 41 204 0 1.4 0 1 0 2\n3 0 2 120 0 178 56 236 1 0.8 1 1 0 2\n4 0 2 120 1 163 57 354 0 0.6 1 0 0 2\n.. ... ... ... ... ... ... ... ... ... ... .. .. ...\n298 0 1 140 1 123 57 241 0 0.2 1 0 0 3\n299 0 1 110 0 132 45 264 1 1.2 1 3 0 3\n300 1 1 144 0 141 68 193 1 3.4 1 0 2 3\n301 0 1 130 1 115 57 131 1 1.2 1 0 1 3\n302 0 1 130 0 174 57 236 0 0.0 0 1 1 2\n\n[303 rows x 13 columns]", "yData": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]", "clf": "KNeighborsClassifier(algorithm='kd_tree', metric='manhattan', n_neighbors=40,\n weights='distance')", "params": "{'n_neighbors': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99], 'metric': ['chebyshev', 'manhattan', 'euclidean', 'minkowski'], 'algorithm': ['brute', 'kd_tree', 'ball_tree'], 'weights': ['uniform', 'distance']}", "eachAlgor": "'KNN'", "AlgorithmsIDsEnd": "550"}}

@ -103,16 +103,16 @@ export default {
var classifiersInfoProcessing = []
for (let i = 0; i < modelId.length; i++) {
let tempSplit = modelId[i].split(/([0-9]+)/)
if (tempSplit[0] == 'KNN' || tempSplit[0] == 'KNNC' || tempSplit[0] == 'KNNM') {
if (tempSplit[0] == 'KNN' || tempSplit[0] == 'KNNC' || tempSplit[0] == 'KNNM' || tempSplit[0] == 'KNNCC' || tempSplit[0] == 'KNNCM' || tempSplit[0] == 'KNNMC' || tempSplit[0] == 'KNNMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> k-nearest neighbor' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else if (tempSplit[0] == 'LR' || tempSplit[0] == 'LRC' || tempSplit[0] == 'LRM') {
else if (tempSplit[0] == 'LR' || tempSplit[0] == 'LRC' || tempSplit[0] == 'LRM' || tempSplit[0] == 'LRCC' || tempSplit[0] == 'LRCM' || tempSplit[0] == 'LRMC' || tempSplit[0] == 'LRMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> logistic regression' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else if (tempSplit[0] == 'MLP' || tempSplit[0] == 'MLPC' || tempSplit[0] == 'MLPM') {
else if (tempSplit[0] == 'MLP' || tempSplit[0] == 'MLPC' || tempSplit[0] == 'MLPM' || tempSplit[0] == 'MLPCC' || tempSplit[0] == 'MLPCM' || tempSplit[0] == 'MLPMC' || tempSplit[0] == 'MLPMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> multilayer perceptron' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else if (tempSplit[0] == 'RF' || tempSplit[0] == 'RFC' || tempSplit[0] == 'RFM') {
else if (tempSplit[0] == 'RF' || tempSplit[0] == 'RFC' || tempSplit[0] == 'RFM' || tempSplit[0] == 'RFCC' || tempSplit[0] == 'RFCM' || tempSplit[0] == 'RFMC' || tempSplit[0] == 'RFMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> random forest' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else {

@ -27,7 +27,8 @@ export default {
percentageOverall: [],
values: [0,0,0,0,0,0,50,50,50,50,50,0,50,50,50,50,50,0],
valuesStage2: [0,0,0,0,0,0,50,50,50,50,50,0,50,50,50,50,50,0,25,25,25,25,25,0,25,25,25,25,25,0,25,25,25,25,25,0,25,25,25,25,25,0],
loop: 0
loop: 0,
storePreviousPercentage: []
}
},
methods: {
@ -35,6 +36,678 @@ export default {
var svg = d3.select("#SankeyInter");
svg.selectAll("*").remove();
},
computePerformanceDiffS () {
var colorsforScatterPlot = this.PerF
console.log(this.storedEnsem)
var mergedStoreEnsembleLoc = [].concat.apply([], this.storedEnsem)
var mergedStoreEnsembleLocFormatted = []
for (let i = 0; i < mergedStoreEnsembleLoc.length; i++) {
mergedStoreEnsembleLocFormatted.push(parseInt(mergedStoreEnsembleLoc[i].replace(/\D/g,'')))
}
colorsforScatterPlot = mergedStoreEnsembleLocFormatted.map((item) => colorsforScatterPlot[item])
console.log(colorsforScatterPlot)
var max = Math.max.apply(Math, colorsforScatterPlot)
var min = Math.min.apply(Math, colorsforScatterPlot)
console.log(max)
console.log(min)
var countMax = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var countMin = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
console.log(this.PerFCM)
for (let i = 0; i < this.storedCM.length; i++) {
let tempSplit = this.storedCM[i].split(/([0-9]+)/)
console.log(tempSplit)
if (tempSplit[0] == 'KNNCC') {
if (this.PerFCM[i] > max) {
countMax[0] = countMax[0] + 1
} else if (this.PerFCM[i] < min) {
countMin[0] = countMin[0] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'KNNCM') {
if (this.PerFCM[i] > max) {
countMax[1] = countMax[1] + 1
} else if (this.PerFCM[i] < min) {
countMin[1] = countMin[1] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'LRCC') {
if (this.PerFCM[i] > max) {
countMax[2] = countMax[2] + 1
}
else if (this.PerFCM[i] < min) {
countMin[2] = countMin[2] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'LRCM') {
if (this.PerFCM[i] > max) {
countMax[3] = countMax[3] + 1
}
else if (this.PerFCM[i] < min) {
countMin[3] = countMin[3] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'MLPCC') {
if (this.PerFCM[i] > max) {
countMax[4] = countMax[4] + 1
}
else if (this.PerFCM[i] < min) {
countMin[4] = countMin[4] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'MLPCM') {
if (this.PerFCM[i] > max) {
countMax[5] = countMax[5] + 1
}
else if (this.PerFCM[i] < min) {
countMin[5] = countMin[5] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'RFCC') {
if (this.PerFCM[i] > max) {
countMax[6] = countMax[6] + 1
}
else if (this.PerFCM[i] < min) {
countMin[6] = countMin[6] + 1
}
}
else if (tempSplit[0] == 'RFCM') {
if (this.PerFCM[i] > max) {
countMax[7] = countMax[7] + 1
}
else if (this.PerFCM[i] < min) {
countMin[7] = countMin[7] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'GradBCC') {
if (this.PerFCM[i] > max) {
countMax[8] = countMax[8] + 1
}
else if (this.PerFCM[i] < min) {
countMin[8] = countMin[8] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'GradBCM') {
if (this.PerFCM[i] > max) {
countMax[9] = countMax[9] + 1
}
else if (this.PerFCM[i] < min) {
countMin[9] = countMin[9] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'KNNMC') {
if (this.PerFCM[i] > max) {
countMax[10] = countMax[10] + 1
} else if (this.PerFCM[i] < min) {
countMin[10] = countMin[10] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'KNNMM') {
if (this.PerFCM[i] > max) {
countMax[11] = countMax[11] + 1
} else if (this.PerFCM[i] < min) {
countMin[11] = countMin[11] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'LRMC') {
if (this.PerFCM[i] > max) {
countMax[12] = countMax[12] + 1
}
else if (this.PerFCM[i] < min) {
countMin[12] = countMin[12] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'LRMM') {
if (this.PerFCM[i] > max) {
countMax[13] = countMax[13] + 1
}
else if (this.PerFCM[i] < min) {
countMin[13] = countMin[13] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'MLPMC') {
if (this.PerFCM[i] > max) {
countMax[14] = countMax[14] + 1
}
else if (this.PerFCM[i] < min) {
countMin[14] = countMin[14] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'MLPMM') {
if (this.PerFCM[i] > max) {
countMax[15] = countMax[15] + 1
}
else if (this.PerFCM[i] < min) {
countMin[15] = countMin[15] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'RFMC') {
if (this.PerFCM[i] > max) {
countMax[16] = countMax[16] + 1
}
else if (this.PerFCM[i] < min) {
countMin[16] = countMin[16] + 1
}
}
else if (tempSplit[0] == 'RFMM') {
if (this.PerFCM[i] > max) {
countMax[17] = countMax[17] + 1
}
else if (this.PerFCM[i] < min) {
countMin[17] = countMin[17] + 1
} else {
continue
}
}
else if (tempSplit[0] == 'GradBMC') {
if (this.PerFCM[i] > max) {
countMax[18] = countMax[18] + 1
}
else if (this.PerFCM[i] < min) {
countMin[18] = countMin[18] + 1
} else {
continue
}
}
else {
if (this.PerFCM[i] > max) {
countMax[19] = countMax[19] + 1
}
else if (this.PerFCM[i] < min) {
countMin[19] = countMin[19] + 1
} else {
continue
}
}
}
console.log(countMax)
console.log(countMin)
var percentage = []
for (let j = 0; j < countMax.length; j++) {
if (j >= 15) {
if (countMax[j] == 0) {
percentage.push((countMin[j]/2)*(-1)*100)
} else {
percentage.push(countMax[j]/2 * 100)
}
} else if (j >= 10) {
if (countMax[j] == 0) {
percentage.push((countMin[j]/2)*(-1)*100)
} else {
percentage.push(countMax[j]/2 * 100)
}
} else if (j >= 5) {
if (countMax[j] == 0) {
percentage.push((countMin[j]/2)*(-1)*100)
} else {
percentage.push(countMax[j]/2 * 100)
}
} else {
if (countMax[j] == 0) {
percentage.push((countMin[j]/2)*(-1) * 100)
} else {
percentage.push(countMax[j]/2 * 100)
}
}
}
//CORRECT
// var percentage = []
// for (let j = 0; j < countMax.length; j++) {
// if (j >= 15) {
// if (countMax[j] == 0) {
// percentage.push((countMin[j]/this.values[37-j])*(-1)*100)
// } else {
// percentage.push(countMax[j]/this.values[37-j] * 100)
// }
// } else if (j >= 10) {
// if (countMax[j] == 0) {
// percentage.push((countMin[j]/this.values[38-j])*(-1)*100)
// } else {
// percentage.push(countMax[j]/this.values[38-j] * 100)
// }
// } else if (j >= 5) {
// if (countMax[j] == 0) {
// percentage.push((countMin[j]/this.values[39-j])*(-1)*100)
// } else {
// percentage.push(countMax[j]/this.values[39-j] * 100)
// }
// } else {
// if (countMax[j] == 0) {
// percentage.push((countMin[j]/this.values[40-j])*(-1) * 100)
// } else {
// percentage.push(countMax[j]/this.values[40-j] * 100)
// }
// }
// }
this.percentageOverall = percentage
},
SankeyViewStage3 () {
var valuesLoc = this.valuesStage2
var localStep = 2
var numberofModels = 6
var units = "Models";
var initialModels = this.RandomSearLoc * 5
var months = [{month:"RandSear",value:initialModels,loss:null},
{month:"Crossover_S1",value:250,loss:null},
{month:"Mutate_S1",value:250,loss:null},
{month:"Crossover_S2",value:125,loss:null},
{month:"Mutate_S2",value:125,loss:null},
{month:"Crossover_S2_Prime'",value:125,loss:null},
{month:"Mutate_S2_Prime",value:125,loss:null}];
//this is the svg canvas attributes: (not buidlign abything just seeting up varaibels)
var margin = {top: 10, right: 40, bottom: 10, left: 40}, //comma is the equivalent of var :
width = 1200 - margin.left - margin.right,
height = 350 - margin.top - margin.bottom;
var svg = d3.select("#SankeyInter");
svg.selectAll("*").remove();
var formatNumber = d3Format(",.0f"), // zero decimal places
format = function(d) { return formatNumber(d) + " " + units; }
var color = d3.scale.category20b()
var startingAxis = this.RandomSearLoc
var axisScale = d3.scale.linear()
.domain([startingAxis*6,0])
.range([0, height]);
//Create the Axis
var yAxis = d3.svg.axis()
.scale(axisScale)
.orient("left")
.ticks(10);
// var lossScale = d3.scale.linear()
// .domain([.95,1,1.05])
// .range(["red","black","green"]);
// append the svg canvas to the page
var svg = d3.select("#SankeyInter").append("svg") //will select the id of cahrt from index.html ln:135 --> # looks for the id= from html
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g") //group everything on the vancas together. will edit down on ln38 below
.attr("transform",
"translate(" + margin.left + "," + margin.top + ") scale(1,-1) translate(" + 0 + "," + -height + ")");
// Set the sankey diagram properties
var sankey = d3Sankey() //calling the function
.nodeWidth(25)
.nodePadding(0)
.size([width, height]);
var path = sankey.link(); //sankey.link() is something happening in sankey.js
// svg.selectAll("text.values")
// .data(months)
// .enter()
// .append("text")
// .text(function(d){return formatNumber(d.value)})
// .attr("class", "innerText")
// .attr("x",function(d,i){return i*89-margin.left-5})
// .attr("y",20)
// .attr("transform", function(d){
// return "translate(" + margin.left + "," + margin.top + ") scale(1,-1) translate(" + 0 + "," + -(d.value/10+15) + ")";});
// svg.selectAll("text.loss")
// .data(months)
// .enter()
// .append("text")
// .text(function(d){return d.loss})
// .attr("class", "innerText")
// .attr("x",function(d,i){return i*89-margin.left-5})
// .attr("y",20)
// .attr("fill",function(d){ return lossScale(d.loss)})
// .attr("transform", function(d){
// return "translate(" + margin.left + "," + margin.top + ") scale(1,-1) translate(" + 0 + "," + -(d.value/10-5) + ")";});
// svg.selectAll("text.months")
// .data(months)
// .enter()
// .append("text")
// .attr("class", "innerText")
// .text(function(d){return d.month})
// .attr("x",function(d,i){return i*89-margin.left-10})
// .attr("y",20)
// .attr("transform",
// "translate(" + margin.left + "," + margin.top + ") scale(1,-1) translate(" + 0 + "," + margin.bottom + ")");
// load the data
var graph = {
"nodes":[
{"name":"GradB","node":0,"month":"RandSear","color":"#a6cee3","dh":height/numberofModels},
{"name":"RF","node":1,"month":"RandSear","color":"#b15928","dh":height/numberofModels},
{"name":"MLP","node":2,"month":"RandSear","color":"#fb9a99","dh":height/numberofModels},
{"name":"LR","node":3,"month":"RandSear","color":"#fdbf6f","dh":height/numberofModels},
{"name":"KNN","node":4,"month":"RandSear","color":"#ff7f00","dh":height/numberofModels},
{"name":"Random search","node":5,"month":"RandSear","color":"#ffffff","dh":height/numberofModels},
{"name":"GradB","node":6,"month":"Crossover_S1","color":"#a6cee3","dh":height/(numberofModels*localStep)},
{"name":"RF","node":7,"month":"Crossover_S1","color":"#b15928","dh":height/(numberofModels*localStep)},
{"name":"MLP","node":8,"month":"Crossover_S1","color":"#fb9a99","dh":height/(numberofModels*localStep)},
{"name":"LR","node":9,"month":"Crossover_S1","color":"#fdbf6f","dh":height/(numberofModels*localStep)},
{"name":"KNN","node":10,"month":"Crossover_S1","color":"#ff7f00","dh":height/(numberofModels*localStep)},
{"name":"Mutate (M) S1","node":11,"month":"Crossover_S1","color":"#ffffff","dh":height/(numberofModels*localStep)},
{"name":"GradB","node":12,"month":"Mutate_S1","color":"#a6cee3","dh":height/(numberofModels*localStep)},
{"name":"RF","node":13,"month":"Mutate_S1","color":"#b15928","dh":height/(numberofModels*localStep)},
{"name":"MLP","node":14,"month":"Mutate_S1","color":"#fb9a99","dh":height/(numberofModels*localStep)},
{"name":"LR","node":15,"month":"Mutate_S1","color":"#fdbf6f","dh":height/(numberofModels*localStep)},
{"name":"KNN","node":16,"month":"Mutate_S1","color":"#ff7f00","dh":height/(numberofModels*localStep)},
{"name":"Crossover (C) S1","node":17,"month":"Mutate_S1","color":"#ffffff","dh":height/(numberofModels*(localStep*2))},
{"name":"GradB","node":18,"month":"Crossover_S2","color":"#a6cee3","dh":height/(numberofModels*(localStep*2))},
{"name":"RF","node":19,"month":"Crossover_S2","color":"#b15928","dh":height/(numberofModels*(localStep*2))},
{"name":"MLP","node":20,"month":"Crossover_S2","color":"#fb9a99","dh":height/(numberofModels*(localStep*2))},
{"name":"LR","node":21,"month":"Crossover_S2","color":"#fdbf6f","dh":height/(numberofModels*(localStep*2))},
{"name":"KNN","node":22,"month":"Crossover_S2","color":"#ff7f00","dh":height/(numberofModels*(localStep*2))},
{"name":"Mutate S2 (M)","node":23,"month":"Crossover_S2","color":"#ffffff","dh":height/(numberofModels*(localStep*2))},
{"name":"GradB","node":24,"month":"Mutate_S2","color":"#a6cee3","dh":height/(numberofModels*(localStep*2))},
{"name":"RF","node":25,"month":"Mutate_S2","color":"#b15928","dh":height/(numberofModels*(localStep*2))},
{"name":"MLP","node":26,"month":"Mutate_S2","color":"#fb9a99","dh":height/(numberofModels*(localStep*2))},
{"name":"LR","node":27,"month":"Mutate_S2","color":"#fdbf6f","dh":height/(numberofModels*(localStep*2))},
{"name":"KNN","node":28,"month":"Mutate_S2","color":"#ff7f00","dh":height/(numberofModels*(localStep*2))},
{"name":"Crossover S2 (M)","node":29,"month":"Mutate_S2","color":"#ffffff","dh":height/(numberofModels*(localStep*2))},
{"name":"GradB","node":30,"month":"Crossover_S2_Prime","color":"#a6cee3","dh":height/(numberofModels*(localStep*2))},
{"name":"RF","node":31,"month":"Crossover_S2_Prime","color":"#b15928","dh":height/(numberofModels*(localStep*2))},
{"name":"MLP","node":32,"month":"Crossover_S2_Prime","color":"#fb9a99","dh":height/(numberofModels*(localStep*2))},
{"name":"LR","node":33,"month":"Crossover_S2_Prime","color":"#fdbf6f","dh":height/(numberofModels*(localStep*2))},
{"name":"KNN","node":34,"month":"Crossover_S2_Prime","color":"#ff7f00","dh":height/(numberofModels*(localStep*2))},
{"name":"Mutate S2 (C)","node":35,"month":"Crossover_S2_Prime","color":"#ffffff","dh":height/(numberofModels*(localStep*2))},
{"name":"GradB","node":36,"month":"Mutate_S2_Prime","color":"#a6cee3","dh":height/(numberofModels*(localStep*2))},
{"name":"RF","node":37,"month":"Mutate_S2_Prime","color":"#b15928","dh":height/(numberofModels*(localStep*2))},
{"name":"MLP","node":38,"month":"Mutate_S2_Prime","color":"#fb9a99","dh":height/(numberofModels*(localStep*2))},
{"name":"LR","node":39,"month":"Mutate_S2_Prime","color":"#fdbf6f","dh":height/(numberofModels*(localStep*2))},
{"name":"KNN","node":40,"month":"Mutate_S2_Prime","color":"#ff7f00","dh":height/(numberofModels*(localStep*2))},
{"name":"Crossover S2 (C)","node":41,"month":"Mutate_S2_Prime","color":"#ffffff","dh":height/(numberofModels*(localStep*2))},
],
"links":[
{"source":5,"target":11,"value":50,"dh":height/(numberofModels*localStep)*(250/(valuesLoc[6]+valuesLoc[7]+valuesLoc[8]+valuesLoc[9]+valuesLoc[10]))},
{"source":5,"target":17,"value":50,"dh":height/(numberofModels*localStep)*(250/(valuesLoc[12]+valuesLoc[13]+valuesLoc[14]+valuesLoc[15]+valuesLoc[16]))},
{"source":0,"target":6,"value":valuesLoc[6],"dh":height/(numberofModels*localStep)*(valuesLoc[6]/50)},
{"source":0,"target":12,"value":valuesLoc[12],"dh":height/(numberofModels*localStep)*(valuesLoc[12]/50)},
{"source":1,"target":7,"value":valuesLoc[7],"dh":height/(numberofModels*localStep)*(valuesLoc[7]/50)},
{"source":1,"target":13,"value":valuesLoc[13],"dh":height/(numberofModels*localStep)*(valuesLoc[13]/50)},
{"source":2,"target":8,"value":valuesLoc[8],"dh":height/(numberofModels*localStep)*(valuesLoc[8]/50)},
{"source":2,"target":14,"value":valuesLoc[14],"dh":height/(numberofModels*localStep)*(valuesLoc[14]/50)},
{"source":3,"target":9,"value":valuesLoc[9],"dh":height/(numberofModels*localStep)*(valuesLoc[9]/50)},
{"source":3,"target":15,"value":valuesLoc[15],"dh":height/(numberofModels*localStep)*(valuesLoc[15]/50)},
{"source":4,"target":10,"value":valuesLoc[10],"dh":height/(numberofModels*localStep)*(valuesLoc[10]/50)},
{"source":4,"target":16,"value":valuesLoc[16],"dh":height/(numberofModels*localStep)*(valuesLoc[16]/50)},
{"source":11,"target":23,"value":25,"dh":height/(numberofModels*(localStep*2))*(125/(valuesLoc[18]+valuesLoc[19]+valuesLoc[20]+valuesLoc[21]+valuesLoc[22]))},
{"source":11,"target":35,"value":25,"dh":height/(numberofModels*(localStep*2))*(125/(valuesLoc[30]+valuesLoc[31]+valuesLoc[32]+valuesLoc[33]+valuesLoc[34]))},
{"source":6,"target":18,"value":valuesLoc[18],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[18]/25)},
{"source":6,"target":24,"value":valuesLoc[24],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[24]/25)},
{"source":7,"target":19,"value":valuesLoc[19],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[19]/25)},
{"source":7,"target":25,"value":valuesLoc[25],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[25]/25)},
{"source":8,"target":20,"value":valuesLoc[20],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[20]/25)},
{"source":8,"target":26,"value":valuesLoc[26],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[26]/25)},
{"source":9,"target":21,"value":valuesLoc[21],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[21]/25)},
{"source":9,"target":27,"value":valuesLoc[27],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[27]/25)},
{"source":10,"target":22,"value":valuesLoc[22],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[22]/25)},
{"source":10,"target":28,"value":valuesLoc[28],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[28]/25)},
{"source":17,"target":29,"value":25,"dh":height/(numberofModels*(localStep*2))*(125/(valuesLoc[24]+valuesLoc[25]+valuesLoc[26]+valuesLoc[27]+valuesLoc[28]))},
{"source":17,"target":41,"value":25,"dh":height/(numberofModels*(localStep*2))*(125/(valuesLoc[36]+valuesLoc[37]+valuesLoc[38]+valuesLoc[39]+valuesLoc[40]))},
{"source":12,"target":30,"value":valuesLoc[30],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[30]/25)},
{"source":12,"target":36,"value":valuesLoc[36],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[36]/25)},
{"source":13,"target":31,"value":valuesLoc[31],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[31]/25)},
{"source":13,"target":37,"value":valuesLoc[37],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[37]/25)},
{"source":14,"target":32,"value":valuesLoc[32],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[32]/25)},
{"source":14,"target":38,"value":valuesLoc[38],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[38]/25)},
{"source":15,"target":33,"value":valuesLoc[33],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[33]/25)},
{"source":15,"target":39,"value":valuesLoc[39],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[39]/25)},
{"source":16,"target":34,"value":valuesLoc[34],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[34]/25)},
{"source":16,"target":40,"value":valuesLoc[40],"dh":height/(numberofModels*(localStep*2))*(valuesLoc[40]/25)},
]}
sankey.nodes(graph.nodes)
.links(graph.links)
.layout(0);
var colorDiff
colorDiff = d3v5.scaleSequential(d3v5.interpolatePRGn).domain([-100, 100])
var percentage = this.percentageOverall
console.log(percentage)
var previousPercentage = this.storePreviousPercentage
// add in the links
var link = svg.append("g").selectAll(".link")
.data(graph.links)
.enter().append("path")
.attr("class", "link")
.attr("d", path) //d??? look it up later
.style("stroke",function(d){
if(d.source.node == 5){
return "transparent";
}
if(d.source.node == 11){
return "transparent";
}
if(d.source.node == 17){
return "transparent";
}
if(d.target.node == 40){
return colorDiff(percentage[0]);
} else if(d.target.node == 39){
return colorDiff(percentage[1]);
} else if(d.target.node == 38){
return colorDiff(percentage[2]);
} else if(d.target.node == 37){
return colorDiff(percentage[3]);
} else if(d.target.node == 36){
return colorDiff(percentage[4]);
} else if(d.target.node == 34){
return colorDiff(percentage[5]);
} else if(d.target.node == 33){
return colorDiff(percentage[6]);
} else if(d.target.node == 32){
return colorDiff(percentage[7]);
} else if(d.target.node == 31){
return colorDiff(percentage[8]);
} else if(d.target.node == 30){
return colorDiff(percentage[9]);
} else if(d.target.node == 28){
return colorDiff(percentage[10]);
} else if(d.target.node == 27){
return colorDiff(percentage[11]);
} else if(d.target.node == 26){
return colorDiff(percentage[12]);
} else if(d.target.node == 25){
return colorDiff(percentage[13]);
} else if(d.target.node == 24){
return colorDiff(percentage[14]);
} else if(d.target.node == 22){
return colorDiff(percentage[15]);
} else if(d.target.node == 21){
return colorDiff(percentage[16]);
} else if(d.target.node == 20){
return colorDiff(percentage[17]);
} else if(d.target.node == 19){
return colorDiff(percentage[18]);
} else if(d.target.node == 18){
return colorDiff(percentage[19]);
} else if(d.target.node == 16){
return colorDiff(previousPercentage[0]);
} else if(d.target.node == 15){
return colorDiff(previousPercentage[1]);
} else if(d.target.node == 14){
return colorDiff(previousPercentage[2]);
} else if(d.target.node == 13){
return colorDiff(previousPercentage[3]);
} else if(d.target.node == 12){
return colorDiff(previousPercentage[4]);
} else if(d.target.node == 10){
return colorDiff(previousPercentage[5]);
} else if(d.target.node == 9){
return colorDiff(previousPercentage[6]);
} else if(d.target.node == 8){
return colorDiff(previousPercentage[7]);
} else if(d.target.node == 7){
return colorDiff(previousPercentage[8]);
} else if(d.target.node == 6){
return colorDiff(previousPercentage[9]);
} else {
return "#808080"
}
})
.style("stroke-width", function(d) { return Math.max(.5, d.dh); }) //setting the stroke length by the data . d.dh is defined in sankey.js
.sort(function(a, b) { return b.dh - a.dh; })
.on("mouseover",linkmouseover)
.on("mouseout",linkmouseout);
// add the link titles
link.append("svg:title") //this is the mouseover stuff title is an svg element you can use "svg:title" or just "title"
.text(function(d) {
return format(d.value); });
// add in the nodes (creating the groups of the rectanlges)
var node = svg.append("g").selectAll(".node")
.data(graph.nodes)
.enter().append("g")
.attr("class", "node")
.attr("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")";
});
//.call(d3.behavior.drag() <---------- THIS IS THE DRAG THING TO REMOVE!!
//.origin(function(d) { return d; })
// .on("dragstart", function() { //<-------- THIS IS MOUSEOVER DRAG CAPABILITIES .on(mousemove) called pointer events, look it up!
// this.parentNode.appendChild(this); })
// .on("drag", dragmove);
// add the rectangles for the nodes
node.append("rect")
.attr("height", function(d) { return d.dh; })
.attr("width", sankey.nodeWidth( ))
.style("fill", function(d) { return d.color; }) //matches name with the colors here! inside the replace is some sort of regex
// .style("stroke",function(d) { return d3.rgb(d.color).darker(1); }) //line around the box formatting
// .style("stroke-width",.5)
.on("mouseover", nodemouseover)
.on("mouseout", nodemouseout);
// add in the title for the nodes
node.append("text")
.attr("x", -6)
.attr("y", function(d) {
if (d.node <= 5) {
return d.dh - 81;
} else if (d.node <= 17) {
return d.dh - 41;
} else {
return d.dh - 21;
}
})
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("transform", "scale(1,-1)")
.text(function(d) { return d.name.replace(/-.*/, ""); })
.style("font-weight", function(d) {
if (d.node == 5 || d.node == 11 || d.node == 17 || d.node == 23 || d.node == 29 || d.node == 35 || d.node == 41) {
return "bold";
}
})
.style("font-size", function(d) {
if (d.node > 17) {
return "14.5px";
}
})
.filter(function(d) { return d.x < width / 2; })//positioning left or right of node
.attr("x", 6 + sankey.nodeWidth())
.attr("text-anchor", "start");
// // the function for moving the nodes
// function dragmove(d) {
// d3.select(this).attr("transform",
// "translate(" + d.x + "," + (
// d.y = Math.max(0, Math.min(height/2 - d.dy, d3.event.y))
// ) + ")");
// sankey.relayout();
// link.attr("d", path);
// }
var status=null;
function nodemouseover(d){
d3.selectAll(".link")
.attr("id", function(i){
if (i.source.node == d.node || i.target.node == d.node){
status="clicked";
} else {
status=null;
}
return status;
});
}
function nodemouseout(d){
d3.selectAll(".link")
.attr("id", "unclicked");
}
function linkmouseover(d){
d3.select(this)
.attr("stroke-opacity",.8);
}
function linkmouseout(d){
d3.select(this)
.attr("stroke-opacity",.3);
}
//select all of our links and set a new stroke color on the conditioan that the value is =.01.
d3.selectAll(".link")
.style("stroke-opacity", function(d){
if(d.value == 0.01) return 0;
});
svg.append("g")
.append("text")
.text("Number of Models")
.attr("font-family","sans-serif")
.attr("font-size",18.5)
.attr("fill","black")
.attr("x",32)
.attr("y",30)
.attr("transform",
"translate(" + -45 + "," + 0 + ") scale(1,-1) translate(" + 0 + "," + -(height) + ") rotate(-90 150 150)");
//y axis
// svg.append("g")
// .call(yAxis)
// .attr("class", "axis")
// .attr("transform",
// "translate(" + -45 + "," + 0 + ") scale(1,-1) translate(" + 0 + "," + -(height) + ")");
},
computePerformanceDiff () {
var colorsforScatterPlot = this.PerF
@ -374,7 +1047,7 @@ export default {
var colorDiff
colorDiff = d3v5.scaleSequential(d3v5.interpolatePRGn).domain([-100, 100])
var percentage = this.percentageOverall
console.log(percentage)
this.storePreviousPercentage = percentage
// add in the links
var link = svg.append("g").selectAll(".link")
.data(graph.links)
@ -854,6 +1527,7 @@ export default {
mounted() {
EventBus.$on('emittedEventCallingSankeyStage2', this.SankeyViewStage2)
EventBus.$on('emittedEventCallingSankeyStage3', this.SankeyViewStage3)
EventBus.$on('changeValues', data => { this.values = data })
EventBus.$on('changeValues', this.SankeyView )
@ -873,7 +1547,8 @@ export default {
this.PerF = data})
EventBus.$on('SendPerformanceCM', data => {
this.PerFCM = data})
EventBus.$on('SendPerformance', this.computePerformanceDiff)
EventBus.$on('SendSank', this.computePerformanceDiff)
EventBus.$on('SendSankS', this.computePerformanceDiffS)
EventBus.$on('SendStoredEnsembleHist', data => { this.storedEnsem = data })
EventBus.$on('SendStoredCMHist', data => { this.storedCM = data })

@ -7,12 +7,20 @@
<option value="umap">UMAP</option>
</select>
&nbsp;&nbsp;
Action: <button
id="Remove"
Action:
<button
id="Remove" style="visibility: visible"
v-on:click="Remove">
<font-awesome-icon icon="dna" />
{{ CrossoverMutateText }}
</button>
<button style="visibility: hidden"
id="AddEnsemble"
v-on:click="Add">
<font-awesome-icon icon="plus-square" />
{{ AddEnsemble }}
</button>
</div>
<div id="OverviewPlotly" class="OverviewPlotly"></div>
</div>
@ -32,6 +40,7 @@ export default {
data () {
return {
CrossoverMutateText: 'Crossover and mutate unselected models',
AddEnsemble: 'Add selected models to ensemble',
WH: [],
ScatterPlotResults: '',
representationDef: 'mds',
@ -78,16 +87,16 @@ export default {
var classifiersInfoProcessing = []
for (let i = 0; i < modelId.length; i++) {
let tempSplit = modelId[i].split(/([0-9]+)/)
if (tempSplit[0] == 'KNN' || tempSplit[0] == 'KNNC' || tempSplit[0] == 'KNNM') {
if (tempSplit[0] == 'KNN' || tempSplit[0] == 'KNNC' || tempSplit[0] == 'KNNM' || tempSplit[0] == 'KNNCC' || tempSplit[0] == 'KNNCM' || tempSplit[0] == 'KNNMC' || tempSplit[0] == 'KNNMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> k-nearest neighbor' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else if (tempSplit[0] == 'LR' || tempSplit[0] == 'LRC' || tempSplit[0] == 'LRM') {
else if (tempSplit[0] == 'LR' || tempSplit[0] == 'LRC' || tempSplit[0] == 'LRM' || tempSplit[0] == 'LRCC' || tempSplit[0] == 'LRCM' || tempSplit[0] == 'LRMC' || tempSplit[0] == 'LRMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> logistic regression' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else if (tempSplit[0] == 'MLP' || tempSplit[0] == 'MLPC' || tempSplit[0] == 'MLPM') {
else if (tempSplit[0] == 'MLP' || tempSplit[0] == 'MLPC' || tempSplit[0] == 'MLPM' || tempSplit[0] == 'MLPCC' || tempSplit[0] == 'MLPCM' || tempSplit[0] == 'MLPMC' || tempSplit[0] == 'MLPMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> multilayer perceptron' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else if (tempSplit[0] == 'RF' || tempSplit[0] == 'RFC' || tempSplit[0] == 'RFM') {
else if (tempSplit[0] == 'RF' || tempSplit[0] == 'RFC' || tempSplit[0] == 'RFM' || tempSplit[0] == 'RFCC' || tempSplit[0] == 'RFCM' || tempSplit[0] == 'RFMC' || tempSplit[0] == 'RFMM') {
classifiersInfoProcessing[i] = '<b>Model ID:</b> ' + modelId[i] + '<br><b>Algorithm:</b> random forest' + '<br><b>Parameters:</b> ' + stringParameters[i]
}
else {
@ -298,9 +307,7 @@ export default {
pushModelsRemainingTemp.push(allModels[i])
}
}
console.log(pushModelsRemainingTemp)
EventBus.$emit('RemainingPoints', pushModelsRemainingTemp)
console.log(ClassifierIDsList)
EventBus.$emit('SendSelectedPointsUpdateIndicator', ClassifierIDsList)
EventBus.$emit('SendSelectedPointsToServerEvent', ClassifierIDsList)
}
@ -308,6 +315,15 @@ export default {
},
Remove () {
EventBus.$emit('InitializeCrossoverMutation')
},
Add () {
},
swapButtons () {
var add = document.getElementById('AddEnsemble');
var remove = document.getElementById('Remove');
remove.style.display = 'none'
add.style.visibility = 'visible'
}
},
mounted() {
@ -323,6 +339,8 @@ export default {
EventBus.$on('ResponsiveandChange', data => {
this.WH = data})
EventBus.$on('hideCrossMut', this.swapButtons)
// reset view
EventBus.$on('resetViews', this.reset)
}

@ -230,6 +230,7 @@ export default Vue.extend({
},
data () {
return {
sankeyCallS: true,
CMNumberofModelsOFFICIAL: [0,0,0,0,0,0,50,50,50,50,50,0,50,50,50,50,50,0],
CMNumberofModels: [0,0,0,0,0,0,5,5,5,5,5,0,5,5,5,5,5,0], // Remove that!
CMNumberofModelsOFFICIALS2: [0,0,0,0,0,0,50,50,50,50,50,0,50,50,50,50,50,0,25,25,25,25,25,0,25,25,25,25,25,0,25,25,25,25,25,0,25,25,25,25,25,0],
@ -358,7 +359,15 @@ export default Vue.extend({
EventBus.$emit('SendPerformance', Performance)
EventBus.$emit('emittedEventCallingCrossoverMutation', this.OverviewResults)
this.PredictSelEnsem = []
EventBus.$emit('emittedEventCallingSankeyStage2')
if (this.sankeyCallS) {
EventBus.$emit('SendSank')
EventBus.$emit('emittedEventCallingSankeyStage2')
} else {
EventBus.$emit('SendSankS')
EventBus.$emit('emittedEventCallingSankeyStage3')
EventBus.$emit('hideCrossMut')
}
EventBus.$emit('emittedEventCallingGrid', this.OverviewResults)
EventBus.$emit('SendSelectedPointsToServerEvent', this.PredictSelEnsem)
this.storeBothEnsCM[1] = this.OverviewResults
@ -392,7 +401,7 @@ export default Vue.extend({
console.log('Server successfully sent all the data related to visualizations!')
EventBus.$emit('emittedEventCallingScatterPlot', this.OverviewResultsCM)
this.storeBothEnsCM[0] = this.OverviewResultsCM
EventBus.$emit('emittedEventCallingSankey', this.OverviewResultsCM)
//EventBus.$emit('emittedEventCallingSankey', this.OverviewResultsCM)
//this.PredictSel = []
//EventBus.$emit('emittedEventCallingGrid', this.OverviewResultsCM)
//EventBus.$emit('SendSelectedPointsToServerEvent', this.PredictSel)
@ -809,6 +818,7 @@ export default Vue.extend({
this.OverAllLength = 0
this.OverSelLengthCM = 0
this.OverAllLengthCM = 0
this.sankeyCallS = true
const postData = {
ClassifiersList: this.reset
}
@ -936,6 +946,7 @@ export default Vue.extend({
loopNumber: this.CMNumberofModelsS2,
Stage: this.CurrentStage
}
this.sankeyCallS = false
}
const axiosConfig = {

@ -274,7 +274,6 @@ export default {
if (this.predictSelection.length != 0) {
var predictions = this.predictSelection
console.log(predictions)
var KNNPred = predictions[0]
var LRPred = predictions[1]
var MLPPred = predictions[2]
@ -282,7 +281,6 @@ export default {
var GradBPred = predictions[4]
var PredAver = predictions[5]
} else {
console.log(predictionsAll)
var KNNPred = predictionsAll[0]
var LRPred = predictionsAll[1]
var MLPPred = predictionsAll[2]
@ -296,11 +294,10 @@ export default {
var RFPredAll = predictionsAll[3]
var GradBPredAll = predictionsAll[4]
var PredAverAll = predictionsAll[5]
console.log(PredAverAll)
console.log(PredAver)
var yValues = JSON.parse(this.GetResultsSelection[6])
var targetNames = JSON.parse(this.GetResultsSelection[7])
console.log(yValues)
var getIndices = []
for (let i = 0; i < targetNames.length; i++) {
let clTemp = []

@ -6,10 +6,10 @@ import 'bootstrap-vue/dist/bootstrap-vue.css'
import router from './router'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { faDna, faEraser, faSearch, faTrash, faCalculator} from '@fortawesome/free-solid-svg-icons'
import { faDna, faEraser, faSearch, faTrash, faCalculator, faPlusSquare} from '@fortawesome/free-solid-svg-icons'
import bFormSlider from 'vue-bootstrap-slider'
library.add(faDna, faEraser, faSearch, faTrash, faCalculator)
library.add(faDna, faEraser, faSearch, faTrash, faCalculator, faPlusSquare)
Vue.component('font-awesome-icon', FontAwesomeIcon)

380
run.py

@ -1433,13 +1433,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr = []
allParametersPerfCrossMutrKNNCC = []
for dr in KNNIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
while countKNN < setMaxLoopValue[40]:
for dr in KNNIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
KNNPickPair = random.sample(KNNIntIndex,2)
pairDF = paramAllAlgs.iloc[KNNPickPair]
crossoverDF = pd.DataFrame()
@ -1478,13 +1478,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
KNNIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrKNNCM = []
for dr in KNNIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
while countKNN < setMaxLoopValue[34]:
for dr in KNNIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
KNNPickPair = random.sample(KNNIntIndex,1)
pairDF = paramAllAlgs.iloc[KNNPickPair]
@ -1526,13 +1526,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrLRCC = []
for dr in LRIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
while countLR < setMaxLoopValue[39]:
for dr in LRIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
LRPickPair = random.sample(LRIntIndex,2)
pairDF = paramAllAlgs.iloc[LRPickPair]
crossoverDF = pd.DataFrame()
@ -1571,13 +1571,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
LRIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrLRCM = []
for dr in LRIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
while countLR < setMaxLoopValue[33]:
for dr in LRIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
LRPickPair = random.sample(LRIntIndex,1)
pairDF = paramAllAlgs.iloc[LRPickPair]
@ -1619,13 +1619,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrMLPCC = []
for dr in MLPIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
while countMLP < setMaxLoopValue[38]:
for dr in MLPIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
MLPPickPair = random.sample(MLPIntIndex,2)
pairDF = paramAllAlgs.iloc[MLPPickPair]
@ -1665,13 +1665,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
MLPIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrMLPCM = []
for dr in MLPIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
while countMLP < setMaxLoopValue[32]:
for dr in MLPIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
MLPPickPair = random.sample(MLPIntIndex,1)
pairDF = paramAllAlgs.iloc[MLPPickPair]
@ -1713,13 +1713,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrRFCC = []
for dr in RFIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
while countRF < setMaxLoopValue[37]:
for dr in RFIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
RFPickPair = random.sample(RFIntIndex,2)
pairDF = paramAllAlgs.iloc[RFPickPair]
@ -1759,16 +1759,18 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
RFIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrRFCM = []
for dr in RFIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
while countRF < setMaxLoopValue[31]:
for dr in RFIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
RFPickPair = random.sample(RFIntIndex,1)
RFPickPair = random.sample(RFIntIndex,1)
pairDF = paramAllAlgs.iloc[RFPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -1808,15 +1810,18 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrGradBCC = []
for dr in GradBIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
while countGradB < setMaxLoopValue[36]:
for dr in GradBIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
GradBPickPair = random.sample(GradBIntIndex,2)
GradBPickPair = random.sample(GradBIntIndex,2)
pairDF = paramAllAlgs.iloc[GradBPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -1850,19 +1855,21 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
HistoryPreservation = HistoryPreservation + allParametersPerfCrossMutrGradBCC
countGradB = 0
GradBIntIndex = []
GradBIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrGradBCM = []
for dr in GradBIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIndex.append(int(re.findall('\d+', dr)[0]))
while countGradB < setMaxLoopValue[30]:
for dr in GradBIDsC:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
GradPickPair = random.sample(GradBIntIndex,1)
GradBPickPair = random.sample(GradBIndex,1)
pairDF = paramAllAlgs.iloc[GradBPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -1914,13 +1921,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr = []
allParametersPerfCrossMutrKNNMC = []
for dr in KNNIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
while countKNN < setMaxLoopValue[28]:
for dr in KNNIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
KNNPickPair = random.sample(KNNIntIndex,2)
pairDF = paramAllAlgs.iloc[KNNPickPair]
crossoverDF = pd.DataFrame()
@ -1959,13 +1966,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
KNNIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrKNNMM = []
for dr in KNNIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
while countKNN < setMaxLoopValue[22]:
for dr in KNNIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
KNNPickPair = random.sample(KNNIntIndex,1)
pairDF = paramAllAlgs.iloc[KNNPickPair]
@ -2007,13 +2014,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrLRMC = []
for dr in LRIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
while countLR < setMaxLoopValue[27]:
for dr in LRIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
LRPickPair = random.sample(LRIntIndex,2)
pairDF = paramAllAlgs.iloc[LRPickPair]
crossoverDF = pd.DataFrame()
@ -2052,13 +2059,13 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
LRIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrLRMM = []
for dr in LRIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
while countLR < setMaxLoopValue[21]:
for dr in LRIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
LRPickPair = random.sample(LRIntIndex,1)
pairDF = paramAllAlgs.iloc[LRPickPair]
@ -2100,16 +2107,17 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrMLPMC = []
for dr in MLPIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
while countMLP < setMaxLoopValue[26]:
for dr in MLPIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
MLPPickPair = random.sample(MLPIntIndex,2)
pairDF = paramAllAlgs.iloc[MLPPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -2146,16 +2154,17 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
MLPIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrMLPMM = []
for dr in MLPIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
while countMLP < setMaxLoopValue[20]:
for dr in MLPIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
MLPPickPair = random.sample(MLPIntIndex,1)
pairDF = paramAllAlgs.iloc[MLPPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -2204,6 +2213,7 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
RFPickPair = random.sample(RFIntIndex,2)
pairDF = paramAllAlgs.iloc[RFPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -2240,16 +2250,17 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
RFIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrRFMM = []
for dr in RFIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
while countRF < setMaxLoopValue[19]:
for dr in RFIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
RFPickPair = random.sample(RFIntIndex,1)
pairDF = paramAllAlgs.iloc[RFPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -2289,12 +2300,14 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrGradBMC = []
for dr in GradBIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
while countGradB < setMaxLoopValue[24]:
for dr in GradBIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
GradBPickPair = random.sample(GradBIntIndex,2)
pairDF = paramAllAlgs.iloc[GradBPickPair]
@ -2335,16 +2348,17 @@ def InitializeSecondStageCM (RemainingIds, setMaxLoopValue):
GradBIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrGradBMM = []
for dr in GradBIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
while countGradB < setMaxLoopValue[18]:
for dr in GradBIDsM:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
GradPickPair = random.sample(GradBIntIndex,1)
GradBPickPair = random.sample(GradBIntIndex,1)
pairDF = paramAllAlgs.iloc[GradBPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -2538,13 +2552,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr = []
allParametersPerfCrossMutrKNNC = []
for dr in KNNIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
while countKNN < setMaxLoopValue[16]:
for dr in KNNIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
KNNPickPair = random.sample(KNNIntIndex,2)
pairDF = paramAllAlgs.iloc[KNNPickPair]
crossoverDF = pd.DataFrame()
@ -2583,13 +2597,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
KNNIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrKNNM = []
for dr in KNNIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
while countKNN < setMaxLoopValue[10]:
for dr in KNNIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
KNNIntIndex.append(int(re.findall('\d+', dr)[0])-addKNN)
else:
KNNIntIndex.append(int(re.findall('\d+', dr)[0]))
KNNPickPair = random.sample(KNNIntIndex,1)
pairDF = paramAllAlgs.iloc[KNNPickPair]
@ -2631,13 +2645,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrLRC = []
for dr in LRIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
while countLR < setMaxLoopValue[15]:
for dr in LRIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
LRPickPair = random.sample(LRIntIndex,2)
pairDF = paramAllAlgs.iloc[LRPickPair]
crossoverDF = pd.DataFrame()
@ -2676,13 +2690,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
LRIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrLRM = []
for dr in LRIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
while countLR < setMaxLoopValue[9]:
for dr in LRIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
LRIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar))
else:
LRIntIndex.append(int(re.findall('\d+', dr)[0]))
LRPickPair = random.sample(LRIntIndex,1)
pairDF = paramAllAlgs.iloc[LRPickPair]
@ -2724,13 +2738,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrMLPC = []
for dr in MLPIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
while countMLP < setMaxLoopValue[14]:
for dr in MLPIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
MLPPickPair = random.sample(MLPIntIndex,2)
pairDF = paramAllAlgs.iloc[MLPPickPair]
@ -2770,13 +2784,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
MLPIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrMLPM = []
for dr in MLPIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
while countMLP < setMaxLoopValue[8]:
for dr in MLPIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
MLPIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*2))
else:
MLPIntIndex.append(int(re.findall('\d+', dr)[0]))
MLPPickPair = random.sample(MLPIntIndex,1)
pairDF = paramAllAlgs.iloc[MLPPickPair]
@ -2818,13 +2832,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrRFC = []
for dr in RFIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
while countRF < setMaxLoopValue[13]:
for dr in RFIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
RFPickPair = random.sample(RFIntIndex,2)
pairDF = paramAllAlgs.iloc[RFPickPair]
@ -2864,16 +2878,16 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
RFIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrRFM = []
for dr in RFIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
while countRF < setMaxLoopValue[7]:
for dr in RFIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
RFIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*3))
else:
RFIntIndex.append(int(re.findall('\d+', dr)[0]))
RFPickPair = random.sample(RFIntIndex,1)
RFPickPair = random.sample(RFIntIndex,1)
pairDF = paramAllAlgs.iloc[RFPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -2912,13 +2926,13 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
localCrossMutr.clear()
allParametersPerfCrossMutrGradBC = []
for dr in GradBIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
while countGradB < setMaxLoopValue[12]:
for dr in GradBIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
GradBPickPair = random.sample(GradBIntIndex,2)
pairDF = paramAllAlgs.iloc[GradBPickPair]
@ -2958,16 +2972,16 @@ def InitializeFirstStageCM (RemainingIds, setMaxLoopValue):
GradBIntIndex = []
localCrossMutr.clear()
allParametersPerfCrossMutrGradBM = []
for dr in GradBIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
while countGradB < setMaxLoopValue[6]:
for dr in GradBIDs:
if (int(re.findall('\d+', dr)[0]) >= greater):
GradBIntIndex.append(int(re.findall('\d+', dr)[0])-(addKNN-randomSearchVar*4))
else:
GradBIntIndex.append(int(re.findall('\d+', dr)[0]))
GradPickPair = random.sample(GradBIntIndex,1)
GradBPickPair = random.sample(GradBIntIndex,1)
pairDF = paramAllAlgs.iloc[GradBPickPair]
crossoverDF = pd.DataFrame()
for column in pairDF:
listData = []
@ -3543,13 +3557,10 @@ def PreprocessingPredSel(SelectedIDs):
numberIDMLP = []
numberIDRF = []
numberIDGradB = []
print(SelectedIDs)
for el in SelectedIDs:
match = re.match(r"([a-z]+)([0-9]+)", el, re.I)
print(match)
if match:
items = match.groups()
print(items)
if ((items[0] == "KNN") | (items[0] == "KNNC") | (items[0] == "KNNM")):
numberIDKNN.append(int(items[1]) - addKNN)
elif ((items[0] == "LR") | (items[0] == "LRC") | (items[0] == "LRM")):
@ -3584,11 +3595,11 @@ def PreprocessingPredSel(SelectedIDs):
dfRF = dfRF.loc[numberIDRF]
dfRF.index += addKNN + addLR + addMLP
print(numberIDGradB)
dfGradB = pd.DataFrame.from_dict(dicGradB)
print(dfGradB)
dfGradB = dfGradB.loc[numberIDGradB]
print(dfGradB)
dfGradB.index += addKNN + addLR + addMLP + addRF
df_concatProbs = pd.concat([dfKNN, dfLR, dfMLP, dfRF, dfGradB])
@ -3633,7 +3644,6 @@ def RetrieveSelIDsPredict():
RetrieveIDsSelection = request.get_data().decode('utf8').replace("'", '"')
RetrieveIDsSelection = json.loads(RetrieveIDsSelection)
RetrieveIDsSelection = RetrieveIDsSelection['predictSelectionIDs']
print(RetrieveIDsSelection)
ResultsSelPred = PreprocessingPredSel(RetrieveIDsSelection)
return 'Everything Okay'

Loading…
Cancel
Save