parent 3e9d842d71
commit 1d17aa97c1
  1. BIN
      __pycache__/run.cpython-38.pyc
  2. 1
      cachedir/joblib/run/estimatorFeatureSelection/0458420fcaa67bddad7fbac56a5ddd15/metadata.json
  3. BIN
      cachedir/joblib/run/estimatorFeatureSelection/09f183e6840705cae875d2d021692380/output.pkl
  4. BIN
      cachedir/joblib/run/estimatorFeatureSelection/486e7a397c1dc420e49e32baff2f0bdd/output.pkl
  5. BIN
      cachedir/joblib/run/estimatorFeatureSelection/6986db5cb4f4b25407ada486934508f2/output.pkl
  6. BIN
      cachedir/joblib/run/estimatorFeatureSelection/6b7f2990321682166191fc123d6b6dec/output.pkl
  7. 1
      cachedir/joblib/run/estimatorFeatureSelection/8fb5e7eee5656f738012f2c6142b8a56/metadata.json
  8. BIN
      cachedir/joblib/run/estimatorFeatureSelection/b2845115d6af09ec379aaa408a255402/output.pkl
  9. 1
      cachedir/joblib/run/estimatorFeatureSelection/ba2cbf4c0fc95bedd05a0cdcd2264654/metadata.json
  10. BIN
      cachedir/joblib/run/estimatorFeatureSelection/ba2cbf4c0fc95bedd05a0cdcd2264654/output.pkl
  11. 1
      cachedir/joblib/run/estimatorFeatureSelection/d02d75616f80e0afe0d40624003cf44f/metadata.json
  12. 15
      frontend/src/components/FeatureSpaceDetail.vue
  13. 4
      frontend/src/components/Main.vue
  14. 67
      frontend/src/components/Results.vue
  15. 49
      run.py

Binary file not shown.

@ -0,0 +1 @@
{"duration": 7.263703107833862, "input_args": {"Data": " F1 F2 F3 F4 F5 F6 F7 F8 F9\n0 7 8 7 8 9 10 10 1 10\n1 4 5 2 3 4 3 3 1 3\n2 5 8 7 10 5 7 5 4 9\n3 3 7 6 4 4 4 6 1 1\n4 1 10 4 6 4 7 7 2 10\n.. .. .. .. .. .. .. .. .. ..\n694 1 1 2 3 1 1 1 1 1\n695 1 3 2 1 1 1 1 1 1\n696 1 3 2 1 2 1 1 2 1\n697 1 3 3 1 1 1 1 1 2\n698 1 2 2 1 1 1 1 1 1\n\n[699 rows x 9 columns]", "clf": "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n colsample_bynode=1, colsample_bytree=1, eta=0.21830844624751583,\n gamma=0, gpu_id=-1, importance_type='gain',\n interaction_constraints='', learning_rate=0.218308449,\n max_delta_step=0, max_depth=7, min_child_weight=1, missing=nan,\n monotone_constraints='()', n_estimators=35, n_jobs=12,\n num_parallel_tree=1, probability=True, random_state=42,\n reg_alpha=0, reg_lambda=1, scale_pos_weight=1, silent=True,\n subsample=1, tree_method='exact', use_label_encoder=False,\n validate_parameters=1, verbosity=0)"}}

@ -0,0 +1 @@
{"duration": 1.832244873046875, "input_args": {"Data": " F1 F2 F3 F4 F5 F6 F7 F9\n0 7 8 7 8 9 10 10 10\n1 4 5 2 3 4 3 3 3\n2 5 8 7 10 5 7 5 9\n3 3 7 6 4 4 4 6 1\n4 1 10 4 6 4 7 7 10\n.. .. .. .. .. .. .. .. ..\n694 1 1 2 3 1 1 1 1\n695 1 3 2 1 1 1 1 1\n696 1 3 2 1 2 1 1 1\n697 1 3 3 1 1 1 1 2\n698 1 2 2 1 1 1 1 1\n\n[699 rows x 8 columns]", "clf": "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n colsample_bynode=1, colsample_bytree=1, eta=0.21830844624751583,\n gamma=0, gpu_id=-1, importance_type='gain',\n interaction_constraints='', learning_rate=0.218308449,\n max_delta_step=0, max_depth=7, min_child_weight=1, missing=nan,\n monotone_constraints='()', n_estimators=35, n_jobs=12,\n num_parallel_tree=1, probability=True, random_state=42,\n reg_alpha=0, reg_lambda=1, scale_pos_weight=1, silent=True,\n subsample=1, tree_method='exact', use_label_encoder=False,\n validate_parameters=1, verbosity=0)"}}

@ -0,0 +1 @@
{"duration": 2.1526169776916504, "input_args": {"Data": " F1 F2 F3 F4 F5 F6 F7 F8 F9 F1+F6\n0 7 8 7 8 9 10 10 1 10 17\n1 4 5 2 3 4 3 3 1 3 7\n2 5 8 7 10 5 7 5 4 9 12\n3 3 7 6 4 4 4 6 1 1 7\n4 1 10 4 6 4 7 7 2 10 8\n.. .. .. .. .. .. .. .. .. .. ...\n694 1 1 2 3 1 1 1 1 1 2\n695 1 3 2 1 1 1 1 1 1 2\n696 1 3 2 1 2 1 1 2 1 2\n697 1 3 3 1 1 1 1 1 2 2\n698 1 2 2 1 1 1 1 1 1 2\n\n[699 rows x 10 columns]", "clf": "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n colsample_bynode=1, colsample_bytree=1, eta=0.21830844624751583,\n gamma=0, gpu_id=-1, importance_type='gain',\n interaction_constraints='', learning_rate=0.218308449,\n max_delta_step=0, max_depth=7, min_child_weight=1, missing=nan,\n monotone_constraints='()', n_estimators=35, n_jobs=12,\n num_parallel_tree=1, probability=True, random_state=42,\n reg_alpha=0, reg_lambda=1, scale_pos_weight=1, silent=True,\n subsample=1, tree_method='exact', use_label_encoder=False,\n validate_parameters=1, verbosity=0)"}}

@ -0,0 +1 @@
{"duration": 6.626190185546875, "input_args": {"Data": " F1 F6 F1+F6 |F1-F6| F1xF6 F1/F6 F6/F1\n0 7 10 17 3 70 0.700000 1.428571\n1 4 3 7 1 12 1.333333 0.750000\n2 5 7 12 2 35 0.714286 1.400000\n3 3 4 7 1 12 0.750000 1.333333\n4 1 7 8 6 7 0.142857 7.000000\n.. .. .. ... ... ... ... ...\n694 1 1 2 0 1 1.000000 1.000000\n695 1 1 2 0 1 1.000000 1.000000\n696 1 1 2 0 1 1.000000 1.000000\n697 1 1 2 0 1 1.000000 1.000000\n698 1 1 2 0 1 1.000000 1.000000\n\n[699 rows x 7 columns]", "clf": "XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n colsample_bynode=1, colsample_bytree=1, eta=0.21830844624751583,\n gamma=0, gpu_id=-1, importance_type='gain',\n interaction_constraints='', learning_rate=0.218308449,\n max_delta_step=0, max_depth=7, min_child_weight=1, missing=nan,\n monotone_constraints='()', n_estimators=35, n_jobs=12,\n num_parallel_tree=1, probability=True, random_state=42,\n reg_alpha=0, reg_lambda=1, scale_pos_weight=1, silent=True,\n subsample=1, tree_method='exact', use_label_encoder=False,\n validate_parameters=1, verbosity=0)"}}

@ -63,7 +63,8 @@ export default {
KeepIDs: [],
KeepIDTransform: [],
keepNumberOfCompareNodes: 0,
activeLeafNode: -1
activeLeafNode: -1,
spaceChangeDetail: false
}
},
methods: {
@ -95,13 +96,15 @@ export default {
},
setLayerExplore() {
console.log('mpike')
this.mode = 0
this.KeepIDs = []
this.KeepIDTransform = []
this.keepNumberOfCompareNodes = 0
//this.graphVizualization()
EventBus.$emit('storeGeneration')
if(!this.spaceChangeDetail) {
EventBus.$emit('storeGeneration')
}
this.spaceChangeDetail = false
},
setLayerCompare() {
this.mode = 1
@ -1920,9 +1923,7 @@ export default {
EventBus.$on('CorrThres', this.initializeNetwork)
EventBus.$on('updateSlice', data => { this.quadrantNumber = data })
EventBus.$on('updateSlice', data => {
document.getElementById("initButton").click()
})
EventBus.$on('updateSlice', this.initializeNetwork)
//EventBus.$on('updateSlice', this.setLayerExplore)
//EventBus.$on('updateSlice', this.initializeNetwork)
@ -1935,6 +1936,8 @@ export default {
EventBus.$on('reset', this.reset)
EventBus.$on('flagSpace', data => { this.spaceChangeDetail = data })
// Get the container element
var btnContainer2 = document.getElementById("resetAllFilters"); //resetAllFilters button
// Get all buttons with class="btn" inside the container

@ -149,7 +149,7 @@ export default Vue.extend({
DataResults: '',
keyNow: 1,
instancesImportance: '',
RetrieveValueFile: 'IrisC', // this is for the default data set
RetrieveValueFile: 'BreastC', // this is for the default data set
SelectedFeaturesPerClassifier: '',
FinalResults: 0,
selectedAlgorithm: '',
@ -476,7 +476,7 @@ export default Vue.extend({
EventBus.$emit('SlidersCall')
this.keySlider = false
}
// EventBus.$emit('ConfirmDataSet') // REMOVE THAT!
EventBus.$emit('ConfirmDataSet') // REMOVE THAT!
} else {
EventBus.$emit('dataSpace', this.correlResul)
EventBus.$emit('quad', this.correlResul)

@ -43,31 +43,6 @@ export default {
var svg = d3.select("#HistoryPlot");
svg.selectAll("*").remove();
var margin = {top: 0, right: 0, bottom: 0, left: 0}
var width = 390 - margin.left - margin.right
var height = 578 - margin.top - margin.bottom
var padding = 3
var xLabelHeight = 30
var yLabelWidth = 80
var borderWidth = 0
var duration = 50
var chart = d3.select('#HistoryPlot').append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', 'translate(' + 0 + ',' + 0 + ')')
var border = chart.append('rect')
.attr('x', yLabelWidth)
.attr('y', xLabelHeight)
.style('fill-opacity', 0)
.style('stroke', '#000')
.style('stroke-width', borderWidth)
.style('shape-rendering', 'crispEdges')
var color = JSON.parse(this.ValidResultsVar[12])
var data = []
var features = this.featuresReceived[33]
@ -107,10 +82,43 @@ export default {
values: this.valuesGlobal[i]
})
}
if (data.length <= 7) {
var heightFinal = 578
} else {
var heightFinal = data.length * 80
}
var margin = {top: 0, right: 0, bottom: 0, left: 0}
var width = 390 - margin.left - margin.right
var height = heightFinal - margin.top - margin.bottom
var padding = 3
var xLabelHeight = 30
var yLabelWidth = 80
var borderWidth = 0
var duration = 50
var chart = d3.select('#HistoryPlot').append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', 'translate(' + 0 + ',' + 0 + ')')
var border = chart.append('rect')
.attr('x', yLabelWidth)
.attr('y', xLabelHeight)
.style('fill-opacity', 0)
.style('stroke', '#000')
.style('stroke-width', borderWidth)
.style('shape-rendering', 'crispEdges')
var color = JSON.parse(this.ValidResultsVar[12])
var allValues = Array.prototype.concat.apply([], data.map(function(d) { return d.values }))
var maxWidth = d3.max(data.map(function(d) { return d.values.length }))
var maxR = d3.min([(width - yLabelWidth) / maxWidth, (height - xLabelHeight) / data.length]) / 2
var maxR = d3.min([(width - yLabelWidth) / maxWidth, (height - xLabelHeight) / 5]) / 2 // Changed to 4 from data.length
// var r = function(d) {
@ -432,7 +440,7 @@ export default {
},
barmode: 'group',
autosize: false,
width: '400',
width: '395',
height: '300',
margin: {
l: 55,
@ -504,4 +512,9 @@ body {
font-size: 12px;
}
div#HistoryPlot {
height: 578px;
overflow: scroll;
}
</style>

@ -80,6 +80,12 @@ def reset():
global yData
yData = []
global XDataNoRemoval
XDataNoRemoval = []
global XDataNoRemovalOrig
XDataNoRemovalOrig = []
global XDataStored
XDataStored = []
global yDataStored
@ -183,6 +189,12 @@ def retrieveFileName():
global XData
XData = []
global XDataNoRemoval
XDataNoRemoval = []
global XDataNoRemovalOrig
XDataNoRemovalOrig = []
global previousState
previousState = []
@ -365,6 +377,12 @@ def sendToServerData():
global finalResultsData
finalResultsData = XData.copy()
global XDataNoRemoval
XDataNoRemoval = XData.copy()
global XDataNoRemovalOrig
XDataNoRemovalOrig = XData.copy()
return 'Processed uploaded data set'
def dataSetSelection():
@ -478,6 +496,12 @@ def dataSetSelection():
global finalResultsData
finalResultsData = XData.copy()
global XDataNoRemoval
XDataNoRemoval = XData.copy()
global XDataNoRemovalOrig
XDataNoRemovalOrig = XData.copy()
warnings.simplefilter('ignore')
executeModel([], 0, '')
@ -512,18 +536,27 @@ def executeModel(exeCall, flagEx, nodeTransfName):
global listofTransformations
global XDataStoredOriginal
global finalResultsData
global XDataNoRemoval
global XDataNoRemovalOrig
columnsNames = []
scores = []
print(exeCall)
print(flagEx)
if (len(exeCall) == 0):
if (flagEx == 3):
XDataStored = XData.copy()
XDataNoRemovalOrig = XDataNoRemoval.copy()
else:
XData = XDataStored.copy()
XDataNoRemoval = XDataNoRemovalOrig.copy()
XDataStoredOriginal = XDataStored.copy()
else:
if (flagEx == 4):
XDataStored = XData.copy()
elif (flagEx == 2):
pass
else:
XData = XDataStored.copy()
XDataStoredOriginal = XDataStored.copy()
@ -533,7 +566,7 @@ def executeModel(exeCall, flagEx, nodeTransfName):
create_global_function()
params = {"n_estimators": (5, 200), "eta": (0.05, 0.3), "max_depth": (6,12)}
bayesopt = BayesianOptimization(estimator, params, random_state=RANDOM_SEED)
bayesopt.maximize(init_points=35, n_iter=15, acq='ucb')
bayesopt.maximize(init_points=10, n_iter=5, acq='ucb') # 35 and 15
bestParams = bayesopt.max['params']
estimator = XGBClassifier(n_estimators=int(bestParams.get('n_estimators')), eta=bestParams.get('eta'), max_depth=int(bestParams.get('max_depth')), probability=True, random_state=RANDOM_SEED, silent=True, verbosity = 0, use_label_encoder=False)
@ -552,6 +585,7 @@ def executeModel(exeCall, flagEx, nodeTransfName):
XDataTemp = XDataGen[columnsKeepNew]
XData[columnsKeepNew] = XDataTemp.values
XDataStoredOriginal[columnsKeepNew] = XDataTemp.values
XDataNoRemoval[columnsKeepNew] = XDataTemp.values
elif (flagEx == 4):
splittedCol = nodeTransfName.split('_')
XData.rename(columns={ XData.columns[exeCall[0]]: nodeTransfName }, inplace = True)
@ -634,11 +668,11 @@ def executeModel(exeCall, flagEx, nodeTransfName):
columnsNames.append(splittedCol[0])
else:
columnsNames.append(splittedCol[0]+'_'+tran)
featureImportanceData = estimatorFeatureSelection(XData, estimator)
featureImportanceData = estimatorFeatureSelection(XDataNoRemoval, estimator)
estimator.fit(XData, yData)
yPredict = estimator.predict(XData)
yPredictProb = cross_val_predict(estimator, XData, yData, cv=crossValidation, method='predict_proba')
print('Data set:',XData)
print(XData)
num_cores = multiprocessing.cpu_count()
inputsSc = ['accuracy','precision_macro','recall_macro']
@ -704,7 +738,7 @@ def featFun (clfLocalPar,DataLocalPar,yDataLocalPar):
# # calculating for all algorithms and models the performance and other results
# @memory.cache
def estimatorFeatureSelection(Data, clf):
print(Data)
resultsFS = []
permList = []
PerFeatureAccuracy = []
@ -1756,8 +1790,9 @@ def CompareFunPy():
for indx, col in enumerate(columns):
if indx in IDsToCompare:
columnsKeepNonOrig.append(col)
columnsKeep.append(columnsOriganl[indx])
columnsKeepID.append(str(indx+1))
columnExtracted = re.findall('\d+', col)
columnsKeep.append(columnsOriganl[int(columnExtracted[0]) - 1])
columnsKeepID.append(str(int(columnExtracted[0])))
if (compareMode == 1):
XDataGen = XData[columnsKeepNonOrig]
feat1 = XDataGen.iloc[:,0]

Loading…
Cancel
Save