fix only provenance

Former-commit-id: 3ae1d26727
master
parent 8f759ce962
commit 75d3d038f7
  1. BIN
      __pycache__/run.cpython-37.pyc
  2. 10
      frontend/src/components/DataSpace.vue
  3. 24
      frontend/src/components/FinalResultsLinePlot.vue
  4. 33
      frontend/src/components/Main.vue
  5. 32
      frontend/src/components/Provenance.vue
  6. 11
      frontend/src/components/ScatterPlot.vue
  7. 213
      run.py

Binary file not shown.

@ -74,6 +74,7 @@ export default {
responsiveWidthHeight: [],
RetrieveDataSet: 'HeartC',
colorsValues: ['#808000','#008080','#bebada','#fccde5','#d9d9d9','#bc80bd','#ccebc5'],
onlyOnce: true,
}
},
methods: {
@ -398,8 +399,10 @@ export default {
var config = {scrollZoom: true, displaylogo: false, showLink: false, showSendToCloud: false, modeBarButtonsToRemove: ['toImage', 'toggleSpikelines', 'autoScale2d', 'hoverClosestGl2d','hoverCompareCartesian','select2d','hoverClosestCartesian','zoomIn2d','zoomOut2d','zoom2d'], responsive: true}
Plotly.newPlot('OverviewDataPlotly', traces, layout, config)
this.selectedDataPoints()
if (this.onlyOnce) {
this.selectedDataPoints()
}
this.onlyOnce = false
},
selectedDataPoints () {
const OverviewDataPlotly = document.getElementById('OverviewDataPlotly')
@ -419,9 +422,10 @@ export default {
}
}
if (ClassifierIDsList != '') {
EventBus.$emit('ChangeKey', 1)
EventBus.$emit('SendSelectedPointsToServerEventfromData', ClassifierIDsListCleared)
} else {
EventBus.$emit('SendSelectedPointsToServerEventfromData', '')
EventBus.$emit('ChangeKey', 0)
}
}
})

@ -64,41 +64,41 @@ export default {
this.scoresPositive.push(parseFloat(this.scoresMean[this.scoresMean.length - 1]) + parseFloat(this.scoresSTD[this.scoresSTD.length - 1]))
this.scoresNegative.push(parseFloat(this.scoresMean[this.scoresMean.length - 1]) - parseFloat(this.scoresSTD[this.scoresSTD.length - 1]))
this.scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[2])*100).toFixed(2))
this.scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[3])*100).toFixed(2))
this.scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[4])*100).toFixed(2))
this.scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[5])*100).toFixed(2))
this.scoresPositive2.push(parseFloat(this.scoresMean2[this.scoresMean2.length - 1]) + parseFloat(this.scoresSTD2[this.scoresSTD2.length - 1]))
this.scoresNegative2.push(parseFloat(this.scoresMean2[this.scoresMean2.length - 1]) - parseFloat(this.scoresSTD2[this.scoresSTD2.length - 1]))
this.scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[4])*100).toFixed(2))
this.scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[5])*100).toFixed(2))
this.scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[8])*100).toFixed(2))
this.scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[9])*100).toFixed(2))
this.scoresPositive3.push(parseFloat(this.scoresMean3[this.scoresMean3.length - 1]) + parseFloat(this.scoresSTD3[this.scoresSTD3.length - 1]))
this.scoresNegative3.push(parseFloat(this.scoresMean3[this.scoresMean3.length - 1]) - parseFloat(this.scoresSTD3[this.scoresSTD3.length - 1]))
this.scoresMean4.push((JSON.parse(this.FinalResultsforLinePlot[6])*100).toFixed(2))
this.scoresSTD4.push((JSON.parse(this.FinalResultsforLinePlot[7])*100).toFixed(2))
this.scoresMean4.push((JSON.parse(this.FinalResultsforLinePlot[12])*100).toFixed(2))
this.scoresSTD4.push((JSON.parse(this.FinalResultsforLinePlot[13])*100).toFixed(2))
this.scoresPositive4.push(parseFloat(this.scoresMean4[this.scoresMean4.length - 1]) + parseFloat(this.scoresSTD4[this.scoresSTD4.length - 1]))
this.scoresNegative4.push(parseFloat(this.scoresMean4[this.scoresMean4.length - 1]) - parseFloat(this.scoresSTD4[this.scoresSTD4.length - 1]))
// Stack
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsforLinePlot[8])*100).toFixed(2))
this.Stack_scoresSTD.push((JSON.parse(this.FinalResultsforLinePlot[9])*100).toFixed(2))
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsforLinePlot[2])*100).toFixed(2))
this.Stack_scoresSTD.push((JSON.parse(this.FinalResultsforLinePlot[3])*100).toFixed(2))
this.Stack_scoresPositive.push(parseFloat(this.Stack_scoresMean[this.Stack_scoresMean.length - 1]) + parseFloat(this.Stack_scoresSTD[this.Stack_scoresSTD.length - 1]))
this.Stack_scoresNegative.push(parseFloat(this.Stack_scoresMean[this.Stack_scoresMean.length - 1]) - parseFloat(this.Stack_scoresSTD[this.Stack_scoresSTD.length - 1]))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[10])*100).toFixed(2))
this.Stack_scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[11])*100).toFixed(2))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsforLinePlot[6])*100).toFixed(2))
this.Stack_scoresSTD2.push((JSON.parse(this.FinalResultsforLinePlot[7])*100).toFixed(2))
this.Stack_scoresPositive2.push(parseFloat(this.Stack_scoresMean2[this.Stack_scoresMean2.length - 1]) + parseFloat(this.Stack_scoresSTD2[this.Stack_scoresSTD2.length - 1]))
this.Stack_scoresNegative2.push(parseFloat(this.Stack_scoresMean2[this.Stack_scoresMean2.length - 1]) - parseFloat(this.Stack_scoresSTD2[this.Stack_scoresSTD2.length - 1]))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[12])*100).toFixed(2))
this.Stack_scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[13])*100).toFixed(2))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsforLinePlot[10])*100).toFixed(2))
this.Stack_scoresSTD3.push((JSON.parse(this.FinalResultsforLinePlot[11])*100).toFixed(2))
this.Stack_scoresPositive3.push(parseFloat(this.Stack_scoresMean3[this.Stack_scoresMean3.length - 1]) + parseFloat(this.Stack_scoresSTD3[this.Stack_scoresSTD3.length - 1]))
this.Stack_scoresNegative3.push(parseFloat(this.Stack_scoresMean3[this.Stack_scoresMean3.length - 1]) - parseFloat(this.Stack_scoresSTD3[this.Stack_scoresSTD3.length - 1]))

@ -275,6 +275,8 @@ export default Vue.extend({
provenanceData: '',
localFile: '',
toggleDeepMain: 1,
keyLoc: 0,
keyData: true,
}
},
methods: {
@ -324,13 +326,13 @@ export default Vue.extend({
this.OverviewResults = response.data.OverviewResults
console.log('Server successfully sent all the data related to visualizations!')
EventBus.$emit('emittedEventCallingScatterPlot', this.OverviewResults)
if (this.firstTimeFlag == 1) {
this.selectedModels_Stack.push(0)
this.selectedModels_Stack.push(JSON.stringify(this.modelsUpdate))
EventBus.$emit('ParametersProvenance', this.OverviewResults)
EventBus.$emit('InitializeProvenance', this.selectedModels_Stack)
}
this.firstTimeFlag = 0
// if (this.firstTimeFlag == 1) {
// this.selectedModels_Stack.push(0)
// this.selectedModels_Stack.push(JSON.stringify(this.modelsUpdate))
// EventBus.$emit('ParametersProvenance', this.OverviewResults)
// EventBus.$emit('InitializeProvenance', this.selectedModels_Stack)
// }
// this.firstTimeFlag = 0
EventBus.$emit('InitializeMetricsBarChart', this.OverviewResults)
this.valueSel = 0
this.valueAll = 0
@ -350,6 +352,13 @@ export default Vue.extend({
EventBus.$emit('emittedEventCallingPredictionsSpacePlotView', this.OverviewResults)
EventBus.$emit('emittedEventCallingBalanceView', this.OverviewResults)
this.DataSpaceCall()
if (this.keyData) {
this.selectedModels_Stack.push(0)
this.selectedModels_Stack.push(JSON.stringify(this.modelsUpdate))
EventBus.$emit('ParametersProvenance', this.OverviewResults)
EventBus.$emit('InitializeProvenance', this.selectedModels_Stack)
}
this.getFinalResults()
})
.catch(error => {
console.log(error)
@ -407,7 +416,6 @@ export default Vue.extend({
this.OverSelLength = 0
EventBus.$emit('resetViews')
} else {
console.log(this.keyNow)
this.OverSelLength = this.ClassifierIDsList.length
const path = `http://127.0.0.1:5000/data/ServerRequestSelPoin`
const postData = {
@ -428,7 +436,7 @@ export default Vue.extend({
if (this.keyNow == 0) {
this.OverAllLength = this.ClassifierIDsList.length
EventBus.$emit('GrayOutPoints', this.ClassifierIDsList)
}
}
this.getSelectedModelsMetrics()
this.getFinalResults()
})
@ -455,7 +463,6 @@ export default Vue.extend({
console.log('Sent the selected points to the server (scatterplot)!')
EventBus.$emit('updateFlagForFinalResults', 0)
this.updatePredictionsSpace()
this.getFinalResults()
})
.catch(error => {
console.log(error)
@ -826,9 +833,10 @@ export default Vue.extend({
EventBus.$emit('emittedEventCallingTogglesUpdate', toggles)
},
DataSpaceFun () {
this.keyData = false
const path = `http://127.0.0.1:5000/data/SendDataSpacPoints`
const postData = {
points: this.dataPointsSelfromDataSpace
points: this.dataPointsSelfromDataSpace,
}
const axiosConfig = {
headers: {
@ -961,6 +969,9 @@ export default Vue.extend({
$(window).on("unload", function(e) {
alert('Handler for .unload() called.');
})
EventBus.$on('sendKeyNow', data => { this.keyLoc = data })
EventBus.$on('ReturningBrushedPointsIDs', data => { this.modelsUpdate = data })
//EventBus.$on('ReturningBrushedPointsIDs', this.UpdateBarChartFeatures )
EventBus.$on('ConfirmDataSet', this.fileNameSend)

@ -1,6 +1,6 @@
<template>
<div>
<div class="squares-container" style="min-height: 374px;">
<div class="squares-container" style="min-height: 374px; margin-left: 35px">
<div id="tooltip"></div> <!-- new -->
<div id="performanceCapture" style="min-height: 150px; margin-top: -10px !important;"></div> <!-- new -->
<canvas id="main-canvas" style="overflow-y: auto; overflow-x: auto; height:190px;"></canvas>
@ -53,7 +53,7 @@ export default {
Stack_scoresMean2: [],
Stack_scoresMean3: [],
Stack_scoresMean4: [],
firstInside: 0
firstInside: 0,
}
},
methods: {
@ -346,7 +346,7 @@ export default {
btnlocal.style.fontWeight = 'normal';
});
$(document).on('click','.dynamic_buttons', function() {
$(document).on('click','.dynamic_buttons', function() {
var btns = document.getElementsByClassName('dynamic_buttons')
btns.forEach(btnlocal => {
@ -356,9 +356,8 @@ export default {
var btn = document.getElementById($(this).attr('id'));
btn.style.fontWeight = 'bold';
EventBus.$emit('requestProven',parseInt($(this).attr('id').replace(/\D/g,''))-1)
EventBus.$emit('ChangeKey', 0)
EventBus.$emit('requestProven',parseInt($(this).attr('id').replace(/\D/g,''))-1)
}
);
},
@ -376,17 +375,15 @@ export default {
this.Stack_scoresMean3 = []
this.Stack_scoresMean4 = []
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsProv[0])*100).toFixed(0))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsProv[2])*100).toFixed(0))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsProv[4])*100).toFixed(0))
this.Stack_scoresMean4.push((JSON.parse(this.FinalResultsProv[6])*100).toFixed(0))
this.Stack_scoresMean.push((JSON.parse(this.FinalResultsProv[0])*100).toFixed(1))
this.Stack_scoresMean2.push((JSON.parse(this.FinalResultsProv[4])*100).toFixed(1))
this.Stack_scoresMean3.push((JSON.parse(this.FinalResultsProv[8])*100).toFixed(1))
this.Stack_scoresMean4.push((JSON.parse(this.FinalResultsProv[12])*100).toFixed(1))
const colorsSingle = ['#fc9272','#fb6a4a','#ef3b2c','#cb181d','#a50f15','#67000d']
const colorsSingle = ['#fdd0a2','#f16913','#7f2704']
var scaleColor = d3v5.scaleLinear()
.domain([0,100,5])
.range(colorsSingle)
.interpolate(d3v5.interpolateRgb); //interpolateHsl interpolateHcl interpolateRgb;
var scaleColor = d3v5.scaleSequential(d3v5.interpolateReds)
.domain([0, 100])
var data = [
{value: this.Stack_scoresMean, label: "Accuracy", color: scaleColor(this.Stack_scoresMean)},
@ -395,7 +392,7 @@ export default {
{value: this.Stack_scoresMean4, label: "F1 Score", color: scaleColor(this.Stack_scoresMean4)}
];
var svg = d3.select('#svg'+this.firstInside).attr('width', width).attr('height', width).style('margin-right', '25px');
var svg = d3.select('#svg'+this.firstInside).attr('width', width).attr('height', width).style('margin-right', '38px');
var arcs = data.map(function (obj, i) {
return d3.svg.arc().innerRadius(i * arcSize + innerRadius).outerRadius((i + 1) * arcSize - (width / 100) + innerRadius);
@ -477,7 +474,10 @@ export default {
});
},
updateExtraction () {
EventBus.$emit('SendSelectedPointsToServerEvent', this.storeData[this.flagUpdated])
if (this.flag) {
EventBus.$emit('SendSelectedPointsToServerEvent', this.storeData[this.flagUpdated])
}
this.flag = true
var stringParameters = []
var temp = 0

@ -62,7 +62,8 @@ export default {
UMAPStore: [],
keyLocal: 0,
activeModels: 0,
pushModelsRemaining: []
pushModelsRemaining: [],
onlyOnce: true
}
},
methods: {
@ -382,10 +383,13 @@ export default {
var scat = document.getElementById('OverviewPlotly')
Plotly.newPlot(scat, DataGeneral, layout, config)
this.selectedPointsOverview()
if (this.onlyOnce) {
this.selectedPointsOverview()
}
this.onlyOnce = false
},
selectedPointsOverview () {
console.log('mpike')
const OverviewPlotly = document.getElementById('OverviewPlotly')
var allModels = JSON.parse(this.ScatterPlotResults[13])
OverviewPlotly.on('plotly_selected', function (evt) {
@ -416,7 +420,6 @@ export default {
EventBus.$emit('SendSelectedPointsToBrushHeatmap', ClassifierIDsListCleared)
} else {
EventBus.$emit('ChangeKey', 1)
EventBus.$emit('SendSelectedPointsToServerEvent', '')
}
}
})

213
run.py

@ -67,6 +67,14 @@ cors = CORS(app, resources={r"/data/*": {"origins": "*"}})
def Reset():
global DataRawLength
global DataResultsRaw
global previousState
previousState = []
global keySpecInternal
keySpecInternal = 1
global previousStateActive
previousStateActive = []
global RANDOM_SEED
RANDOM_SEED = 42
@ -86,6 +94,9 @@ def Reset():
global AdaBModelsCount
global GradBModelsCount
global keyData
keyData = 0
KNNModelsCount = 0
SVCModelsCount = 576
GausNBModelsCount = 736
@ -168,12 +179,24 @@ def RetrieveFileName():
fileName = request.get_data().decode('utf8').replace("'", '"')
global keySpecInternal
keySpecInternal = 1
global RANDOM_SEED
RANDOM_SEED = 42
global keyData
keyData = 0
global XData
XData = []
global previousState
previousState = []
global previousStateActive
previousStateActive = []
global yData
yData = []
@ -1685,10 +1708,11 @@ def RetrieveSelClassifiersID():
ClassifierIDsList = request.get_data().decode('utf8').replace("'", '"')
ComputeMetricsForSel(ClassifierIDsList)
ClassifierIDCleaned = json.loads(ClassifierIDsList)
global keySpecInternal
keySpecInternal = 1
keySpecInternal = ClassifierIDCleaned['keyNow']
global keySpec
keySpec = ClassifierIDCleaned['keyNow']
print(keySpec)
EnsembleModel(ClassifierIDsList, 1)
return 'Everything Okay'
@ -2429,6 +2453,11 @@ def FeatureSelPerModel():
def EnsembleModel(Models, keyRetrieved):
global scores
global previousState
global previousStateActive
global keySpec
global keySpecInternal
global keyData
scores = []
global all_classifiersSelection
@ -2581,9 +2610,6 @@ def EnsembleModel(Models, keyRetrieved):
arg = dfParamGradBFilt[eachelem-GradBModelsCount]
all_classifiers.append(make_pipeline(ColumnSelector(cols=columnsInit), GradientBoostingClassifier(random_state=RANDOM_SEED).set_params(**arg)))
global sclfStack
sclfStack = 0
global sclf
sclf = 0
sclf = StackingCVClassifier(classifiers=all_classifiers,
@ -2591,11 +2617,10 @@ def EnsembleModel(Models, keyRetrieved):
meta_classifier=lr,
random_state=RANDOM_SEED,
n_jobs = -1)
sclfStack = sclf
keySpec = 0
elif (keyRetrieved == 1):
Models = json.loads(Models)
ModelsAll = preProceModels()
global keySpec
for index, modHere in enumerate(ModelsAll):
flag = 0
for loop in Models['ClassifiersList']:
@ -2609,11 +2634,8 @@ def EnsembleModel(Models, keyRetrieved):
meta_classifier=lr,
random_state=RANDOM_SEED,
n_jobs = -1)
print('mpike')
if (keySpec == 0):
sclfStack = sclf
keySpec = 1
elif (keyRetrieved == 2):
# fix this part!
if (len(all_classifiersSelection) == 0):
all_classifiers = []
columnsInit = []
@ -2769,22 +2791,25 @@ def EnsembleModel(Models, keyRetrieved):
meta_classifier=lr,
random_state=RANDOM_SEED,
n_jobs = -1)
else:
Models = json.loads(Models)
ModelsAll = preProceModels()
for index, modHere in enumerate(ModelsAll):
flag = 0
for loop in Models['ClassifiersList']:
if (int(loop) == int(modHere)):
flag = 1
if (flag is 1):
all_classifiersSelection.append(all_classifiers[index])
sclfStack = StackingCVClassifier(classifiers=all_classifiersSelection,
use_probas=True,
meta_classifier=lr,
random_state=RANDOM_SEED,
n_jobs = -1)
keySpec = 1
else:
keySpec = 2
# Models = json.loads(Models)
# ModelsAll = preProceModels()
# for index, modHere in enumerate(ModelsAll):
# flag = 0
# for loop in Models['ClassifiersList']:
# if (int(loop) == int(modHere)):
# flag = 1
# if (flag is 1):
# all_classifiersSelection.append(all_classifiers[index])
# sclfStack = StackingCVClassifier(classifiers=all_classifiersSelection,
# use_probas=True,
# meta_classifier=lr,
# random_state=RANDOM_SEED,
# n_jobs = -1)
#else:
@ -2803,24 +2828,134 @@ def EnsembleModel(Models, keyRetrieved):
# random_state=RANDOM_SEED,
# n_jobs = -1)
if (keyRetrieved == 0):
pass
else:
# if (keyRetrieved == 0):
# pass
# else:
print(keySpec)
print(keySpecInternal)
if (keySpec == 0 or keySpec == 1):
num_cores = multiprocessing.cpu_count()
inputsSc = ['accuracy','precision_weighted','recall_weighted','accuracy','precision_weighted','recall_weighted','f1_weighted','f1_weighted']
flat_results = Parallel(n_jobs=num_cores)(delayed(solve)(sclf,sclfStack,XData,yData,crossValidation,item,index) for index, item in enumerate(inputsSc))
inputsSc = ['accuracy','precision_weighted','recall_weighted','f1_weighted']
flat_results = Parallel(n_jobs=num_cores)(delayed(solve)(sclf,keyData,keySpec,keySpecInternal,previousState,previousStateActive,XData,yData,crossValidation,item,index) for index, item in enumerate(inputsSc))
scores = [item for sublist in flat_results for item in sublist]
if (keySpec == 0):
previousState = []
previousState.append(scores[2])
previousState.append(scores[3])
previousState.append(scores[6])
previousState.append(scores[7])
previousState.append(scores[10])
previousState.append(scores[11])
previousState.append(scores[14])
previousState.append(scores[15])
elif (keySpec == 1):
if (keySpecInternal == 1):
previousStateActive = []
previousStateActive.append(scores[0])
previousStateActive.append(scores[1])
previousStateActive.append(scores[4])
previousStateActive.append(scores[5])
previousStateActive.append(scores[8])
previousStateActive.append(scores[9])
previousStateActive.append(scores[12])
previousStateActive.append(scores[13])
else:
previousStateActive = []
previousStateActive.append(scores[0])
previousStateActive.append(scores[1])
previousStateActive.append(scores[4])
previousStateActive.append(scores[5])
previousStateActive.append(scores[8])
previousStateActive.append(scores[9])
previousStateActive.append(scores[12])
previousStateActive.append(scores[13])
previousState = []
previousState.append(scores[2])
previousState.append(scores[3])
previousState.append(scores[6])
previousState.append(scores[7])
previousState.append(scores[10])
previousState.append(scores[11])
previousState.append(scores[14])
previousState.append(scores[15])
else:
scores = []
previousState = []
scores.append(previousStateActive[0])
scores.append(previousStateActive[1])
scores.append(previousStateActive[0])
scores.append(previousStateActive[1])
previousState.append(previousStateActive[0])
previousState.append(previousStateActive[1])
scores.append(previousStateActive[2])
scores.append(previousStateActive[3])
scores.append(previousStateActive[2])
scores.append(previousStateActive[3])
previousState.append(previousStateActive[2])
previousState.append(previousStateActive[3])
scores.append(previousStateActive[4])
scores.append(previousStateActive[5])
scores.append(previousStateActive[4])
scores.append(previousStateActive[5])
previousState.append(previousStateActive[4])
previousState.append(previousStateActive[5])
scores.append(previousStateActive[6])
scores.append(previousStateActive[7])
scores.append(previousStateActive[6])
scores.append(previousStateActive[7])
previousState.append(previousStateActive[6])
previousState.append(previousStateActive[7])
return 'Okay'
def solve(sclf,sclfStack,XData,yData,crossValidation,scoringIn,loop):
def solve(sclf,keyData,keySpec,keySpecInternal,previousStateLoc,previousStateActiveLoc,XData,yData,crossValidation,scoringIn,loop):
scoresLoc = []
if (loop < 3):
if (keySpec == 0):
temp = model_selection.cross_val_score(sclf, XData, yData, cv=crossValidation, scoring=scoringIn, n_jobs=-1)
scoresLoc.append(temp.mean())
scoresLoc.append(temp.std())
if (keyData == 1):
if (loop == 0):
scoresLoc.append(previousStateLoc[0])
scoresLoc.append(previousStateLoc[1])
elif (loop == 1):
scoresLoc.append(previousStateLoc[2])
scoresLoc.append(previousStateLoc[3])
elif (loop == 2):
scoresLoc.append(previousStateLoc[4])
scoresLoc.append(previousStateLoc[5])
else:
scoresLoc.append(previousStateLoc[6])
scoresLoc.append(previousStateLoc[7])
else:
scoresLoc.append(temp.mean())
scoresLoc.append(temp.std())
else:
temp = model_selection.cross_val_score(sclfStack, XData, yData, cv=crossValidation, scoring=scoringIn, n_jobs=-1)
scoresLoc.append(temp.mean())
scoresLoc.append(temp.std())
if (keySpecInternal == 1):
temp = model_selection.cross_val_score(sclf, XData, yData, cv=crossValidation, scoring=scoringIn, n_jobs=-1)
scoresLoc.append(temp.mean())
scoresLoc.append(temp.std())
if (loop == 0):
scoresLoc.append(previousStateLoc[0])
scoresLoc.append(previousStateLoc[1])
elif (loop == 1):
scoresLoc.append(previousStateLoc[2])
scoresLoc.append(previousStateLoc[3])
elif (loop == 2):
scoresLoc.append(previousStateLoc[4])
scoresLoc.append(previousStateLoc[5])
else:
scoresLoc.append(previousStateLoc[6])
scoresLoc.append(previousStateLoc[7])
else:
temp = model_selection.cross_val_score(sclf, XData, yData, cv=crossValidation, scoring=scoringIn, n_jobs=-1)
scoresLoc.append(temp.mean())
scoresLoc.append(temp.std())
scoresLoc.append(temp.mean())
scoresLoc.append(temp.std())
return scoresLoc
# Sending the final results to be visualized as a line plot
@ -2856,6 +2991,8 @@ def RetrieveFilter():
def RetrieveDataSpacePoints():
dataSpacePoints = request.get_data().decode('utf8').replace("'", '"')
dataSpacePointsCleared = json.loads(dataSpacePoints)
global keyData
keyData = 1
global dataSpacePointsIDs
dataSpacePointsIDs = dataSpacePointsCleared['points']
return 'Done'

Loading…
Cancel
Save