parent 1d17aa97c1
commit f476157f9c
  1. BIN
      __pycache__/run.cpython-38.pyc
  2. 33
      frontend/src/components/FeatureSpaceDetail.vue
  3. 31
      frontend/src/components/Heatmap.vue
  4. 2
      frontend/src/components/Main.vue
  5. 26
      frontend/src/components/Results.vue
  6. 209
      run.py

Binary file not shown.

@ -62,6 +62,7 @@ export default {
mode: 0, // this should be 0
KeepIDs: [],
KeepIDTransform: [],
KeepNamesGlobal: [],
keepNumberOfCompareNodes: 0,
activeLeafNode: -1,
spaceChangeDetail: false
@ -98,6 +99,7 @@ export default {
setLayerExplore() {
this.mode = 0
this.KeepIDs = []
this.KeepNamesGlobal = []
this.KeepIDTransform = []
this.keepNumberOfCompareNodes = 0
//this.graphVizualization()
@ -822,7 +824,7 @@ export default {
var legendCall = this.legendOnlyOnce
var listofNodes = this.dataFS[34]
var listofNodes = this.dataFS[33]
var corrTarget = JSON.parse(this.dataFS[8+this.quadrantNumber])
var corrGlob = JSON.parse(this.dataFS[13+this.quadrantNumber])
@ -948,6 +950,7 @@ export default {
var selectionCounter = this.keepNumberOfCompareNodes
var IDsGather = this.KeepIDs
var IDsGatherTrans = this.KeepIDTransform
var keepNames = this.KeepNamesGlobal
var node = svg.append('g')
.attr('class', 'nodes')
@ -961,9 +964,17 @@ export default {
if (!clickedNode.includes("root")) {
var clearSendNode = []
clearSendNode.push(id.name)
var name = id.name
var splitName = name.split("_")
for (let m = 0; m < listofNodes.length ; m++) {
if (listofNodes[m].includes(splitName[0])) {
var valueToSend = m
}
}
clearSendNode.push(clickedNode-1)
EventBus.$emit('updateHistoryKey', 2)
EventBus.$emit('updateValuesofHistory', clickedNode-1)
EventBus.$emit('updateValuesofHistory', valueToSend)
EventBus.$emit('UpdateIDTrans', [clickedNode-1])
EventBus.$emit('transformNodes', clearSendNode)
} else {
@ -1072,13 +1083,21 @@ export default {
groupsColor.setAttribute('fill', '#969696')
selectionCounter = selectionCounter + 1
EventBus.$emit('Counter', selectionCounter)
var name = id.name
var splitName = name.split("_")
for (let m = 0; m < listofNodes.length ; m++) {
if (listofNodes[m].includes(splitName[0])) {
var valueToSend = m
}
}
keepNames.push(valueToSend)
IDsGather.push(idLocal);
if (selectionCounter == 2) {
EventBus.$emit('updateValuesofHistory', IDsGather)
EventBus.$emit('updateValuesofHistory', keepNames)
EventBus.$emit('UpdateIDs', IDsGather)
EventBus.$emit('CompareTwo', IDsGather)
} else if (selectionCounter == 3) {
EventBus.$emit('updateValuesofHistory', IDsGather)
EventBus.$emit('updateValuesofHistory', keepNames)
EventBus.$emit('UpdateIDs', IDsGather)
EventBus.$emit('CompareThree', IDsGather)
} else {
@ -1094,8 +1113,9 @@ export default {
}
EventBus.$emit('UpdateIDs', IDsGather)
if (selectionCounter == 1) {
EventBus.$emit('diactiveTransform')
EventBus.$emit('Default')
//EventBus.$emit('diactiveTransform')
//EventBus.$emit('Default')
EventBus.$emit('storeGeneration')
} else if (selectionCounter == 2) {
EventBus.$emit('UpdateIDs', IDsGather)
EventBus.$emit('CompareTwo', IDsGather)
@ -1915,6 +1935,7 @@ export default {
EventBus.$on('Counter', data => { this.keepNumberOfCompareNodes = data })
EventBus.$on('UpdateIDs', data => { this.KeepIDs = data })
EventBus.$on('UpdateNames', data => { this.KeepNamesGlobal = data })
EventBus.$on('UpdateIDTrans', data => { this.KeepIDTransform = data })

@ -40,7 +40,8 @@ export default {
dataFI: [],
featureData: [],
generKey: [],
featureGenGlobal: []
featureGenGlobal: [],
keepMainRemovedFeatures: [],
}
},
methods: {
@ -73,6 +74,8 @@ export default {
var featureUni = JSON.parse(this.dataFI[0])
var featuresFinal = this.featureData[33]
var status = this.keepMainRemovedFeatures
var algorithms = []
algorithms.push("Univariate FS")
algorithms.push("Impurity-based FI")
@ -131,7 +134,15 @@ export default {
values[j] = ((((Object.values(featureUni.Score)[i]-minUni)/(maxUni-minUni)))+(ImpurityFS[0][i])+(PermImpEli[i][0])+(FeaturesAccuracy[i][0])+(RankingFS[0][i]))/(len2-2)
} else {
if (Object.entries(this.generKey).length == 0) {
values[j] = -2
if (status.length != 0) {
if (status.includes(Features[i])){
values[j] = -4
} else {
values[j] = -2
}
} else {
values[j] = -2
}
} else {
if (Object.entries(this.generKey).length == 7) {
if (i == 0 || i == 1) {
@ -170,6 +181,9 @@ export default {
},
heatmap_display(data, heatmapId) {
var status = this.keepMainRemovedFeatures
if (Object.entries(this.generKey).length == 0) {
var Features = JSON.parse(this.featureData[0])
} else {
@ -399,6 +413,15 @@ export default {
if (index > -1) {
featuresAddRem.splice(index, 1);
}
if (status.includes(Features[k])) {
var outputArray = [];
for (let i = 0; i < status.length; i++) {
if (status[i] !== Features[k]) {
outputArray.push(status[i]);
}
}
EventBus.$emit('updateRemovedFeaturesBack', outputArray)
}
EventBus.$emit('updateHistoryKey', 0)
EventBus.$emit('updateValuesofHistory', k)
EventBus.$emit('addFeature', featuresAddRem)
@ -429,7 +452,9 @@ export default {
EventBus.$emit('removeFeaturesGen', featuresGen)
return "url(#diagonalHatch)"
} else {
status.push(Features[k])
featuresAddRem.push(k)
EventBus.$emit('updateRemovedFeatures', status)
EventBus.$emit('updateHistoryKey', 1)
EventBus.$emit('updateValuesofHistory', k)
EventBus.$emit('removeFeatures', featuresAddRem)
@ -650,6 +675,8 @@ export default {
EventBus.$on('quad', data => { this.featureData = data })
EventBus.$on('updateRemovedFeatures', data => { this.keepMainRemovedFeatures = data })
EventBus.$on('reset', this.reset)
}
}

@ -149,7 +149,7 @@ export default Vue.extend({
DataResults: '',
keyNow: 1,
instancesImportance: '',
RetrieveValueFile: 'BreastC', // this is for the default data set
RetrieveValueFile: 'IrisC', // this is for the default data set
SelectedFeaturesPerClassifier: '',
FinalResults: 0,
selectedAlgorithm: '',

@ -27,7 +27,9 @@ export default {
whereIsChange: -1,
previousState: [],
storeBestSoFarAV: [],
flag: true
flag: true,
onHold: 0,
keepFeaturesAddedGenRemoved: 0
}
},
methods: {
@ -44,8 +46,18 @@ export default {
svg.selectAll("*").remove();
var data = []
var features = this.featuresReceived[33]
if (this.historyKey == 5) {
this.onHold = 0
}
if (this.historyKey == 3) {
if (this.onHold > 0) {
for ( var i = 0; i < this.onHold; i++ ) {
features.pop();
}
}
}
if (this.historyKey == -1) {
for (let i = 0; i < features.length; i++) {
this.valuesGlobal.push([state,0,0,0])
@ -65,11 +77,13 @@ export default {
this.valuesGlobal[this.whereIsChange[j]][0] = state
}
} else if (this.historyKey == 5) {
this.valuesGlobal.push([state,0,0,0])
for (let k = 0; k < this.keepFeaturesAddedGenRemoved ; k++) {
this.valuesGlobal.push([state,0,0,0])
}
} else {
}
console.log(this.valuesGlobal)
var toWhichTrans = this.historyKey
var toWhichPosition = this.whereIsChange
var counterSet = -1
@ -472,12 +486,16 @@ export default {
EventBus.$on('updateHistoryKey', data => { this.historyKey = data })
EventBus.$on('updateValuesofHistory', data => { this.whereIsChange = data })
EventBus.$on('addFeatureGen', data => { this.onHold = Object.values(data).length })
EventBus.$on('finalResults', data => { this.ValidResultsVar = data })
EventBus.$on('finalResults', this.initializeLinePLot)
EventBus.$on('quad', data => { this.featuresReceived = data })
EventBus.$on('finalResults', this.HistoryPun)
EventBus.$on('addFeatureGen', data => { this.keepFeaturesAddedGenRemoved = Object.values(data).length })
EventBus.$on('reset', this.reset)
}
}

209
run.py

@ -58,11 +58,6 @@ def reset():
global filterActionFinal
filterActionFinal = ''
global storePositions
global storeReplacements
storePositions = []
storeReplacements = []
global keySpecInternal
keySpecInternal = 1
@ -159,11 +154,6 @@ def retrieveFileName():
global DataResultsRawTest
global DataRawLengthTest
global storePositions
global storeReplacements
storePositions = []
storeReplacements = []
global fileName
fileName = []
fileName = request.get_data().decode('utf8').replace("'", '"')
@ -481,7 +471,7 @@ def dataSetSelection():
global keepOriginalFeatures
keepOriginalFeatures = XData.copy()
keepOriginalFeatures.columns = [str(col) + ' (F'+str(idx+1)+')' for idx, col in enumerate(keepOriginalFeatures.columns)]
keepOriginalFeatures.columns = [str(col) + ' F'+str(idx+1)+'' for idx, col in enumerate(keepOriginalFeatures.columns)]
columnsNewGen = keepOriginalFeatures.columns.values.tolist()
XData.columns = ['F'+str(idx+1) for idx, col in enumerate(XData.columns)]
@ -536,6 +526,7 @@ def executeModel(exeCall, flagEx, nodeTransfName):
global listofTransformations
global XDataStoredOriginal
global finalResultsData
global tracker
global XDataNoRemoval
global XDataNoRemovalOrig
@ -548,6 +539,11 @@ def executeModel(exeCall, flagEx, nodeTransfName):
if (flagEx == 3):
XDataStored = XData.copy()
XDataNoRemovalOrig = XDataNoRemoval.copy()
elif (flagEx == 2):
XData = XDataStored.copy()
XDataStoredOriginal = XDataStored.copy()
XDataNoRemoval = XDataNoRemovalOrig.copy()
columnsNewGen = keepOriginalFeatures.columns.values.tolist()
else:
XData = XDataStored.copy()
XDataNoRemoval = XDataNoRemovalOrig.copy()
@ -555,12 +551,19 @@ def executeModel(exeCall, flagEx, nodeTransfName):
else:
if (flagEx == 4):
XDataStored = XData.copy()
XDataNoRemovalOrig = XDataNoRemoval.copy()
print('edw!')
#XDataStoredOriginal = XDataStored.copy()
elif (flagEx == 2):
pass
XData = XDataStored.copy()
XDataStoredOriginal = XDataStored.copy()
XDataNoRemoval = XDataNoRemovalOrig.copy()
columnsNewGen = keepOriginalFeatures.columns.values.tolist()
else:
XData = XDataStored.copy()
#XDataNoRemoval = XDataNoRemovalOrig.copy()
XDataStoredOriginal = XDataStored.copy()
columnsNewGen = keepOriginalFeatures.columns.values.tolist()
# Bayesian Optimization CHANGE INIT_POINTS!
if (keyFirstTime):
create_global_function()
@ -569,6 +572,7 @@ def executeModel(exeCall, flagEx, nodeTransfName):
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)
columnsNewGen = keepOriginalFeatures.columns.values.tolist()
if (len(exeCall) != 0):
if (flagEx == 1):
@ -588,18 +592,20 @@ def executeModel(exeCall, flagEx, nodeTransfName):
XDataNoRemoval[columnsKeepNew] = XDataTemp.values
elif (flagEx == 4):
splittedCol = nodeTransfName.split('_')
XData.rename(columns={ XData.columns[exeCall[0]]: nodeTransfName }, inplace = True)
for col in XDataNoRemoval.columns:
if ((splittedCol[0] in col)):
storeRenamedColumn = col
XData.rename(columns={ storeRenamedColumn: nodeTransfName }, inplace = True)
XDataNoRemoval.rename(columns={ storeRenamedColumn: nodeTransfName }, inplace = True)
currentColumn = columnsNewGen[exeCall[0]]
subString = currentColumn[currentColumn.find("(")+1:currentColumn.find(")")]
replacement = currentColumn.replace(subString, nodeTransfName)
storePositions.append(exeCall[0])
storeReplacements.append(replacement)
pos = 0
for repl in storeReplacements:
columnsNewGen[storePositions[pos]] = repl
pos += 1
for ind, column in enumerate(columnsNewGen):
if ((splittedCol[0] in column)):
columnsNewGen[ind] = columnsNewGen[ind].replace(storeRenamedColumn, nodeTransfName)
if (len(splittedCol) == 1):
XData[nodeTransfName] = XDataStoredOriginal[nodeTransfName]
XDataNoRemoval[nodeTransfName] = XDataStoredOriginal[nodeTransfName]
else:
if (splittedCol[1] == 'r'):
XData[nodeTransfName] = XData[nodeTransfName].round()
@ -653,10 +659,35 @@ def executeModel(exeCall, flagEx, nodeTransfName):
XData[nodeTransfName] = np.power(XData[nodeTransfName], 3)
else:
XData[nodeTransfName] = np.power(XData[nodeTransfName], 4)
XDataStored = XData.copy()
XDataNoRemoval[nodeTransfName] = XData[nodeTransfName]
XDataStored = XData.copy()
XDataNoRemovalOrig = XDataNoRemoval.copy()
columnsNamesLoc = XData.columns.values.tolist()
tracker = []
for value in columnsNewGen:
value = value.split(' ')
if (len(value) > 1):
tracker.append(value[1])
else:
tracker.append(value[0])
storeIndices = []
valuesStore = []
for ind, col in enumerate(tracker):
for value in XDataStoredOriginal.columns.values.tolist():
if col in value:
storeIndices.append(ind)
valuesStore.append(valuesStore)
tracker[ind] = tracker[ind].replace(col, value)
else:
break
# FIX THAT!
#for el in storeIndices:
# columnsNewGen[el] = columnsNewGen[el].replace(columnsNewGen[el],valuesStore[el])
#print(columnsNewGen)
for col in columnsNamesLoc:
splittedCol = col.split('_')
if (len(splittedCol) == 1):
@ -669,10 +700,14 @@ def executeModel(exeCall, flagEx, nodeTransfName):
else:
columnsNames.append(splittedCol[0]+'_'+tran)
featureImportanceData = estimatorFeatureSelection(XDataNoRemoval, estimator)
print(XData)
print(XDataStored)
print(XDataStoredOriginal.columns)
print(XDataNoRemoval)
estimator.fit(XData, yData)
yPredict = estimator.predict(XData)
yPredictProb = cross_val_predict(estimator, XData, yData, cv=crossValidation, method='predict_proba')
print(XData)
num_cores = multiprocessing.cpu_count()
inputsSc = ['accuracy','precision_macro','recall_macro']
@ -738,7 +773,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 = []
@ -1715,7 +1750,7 @@ def Seperation():
packCorr.append(json.dumps(MI4List))
packCorr.append(json.dumps(MI5List))
packCorr.append(list(XDataStored.columns.values.tolist()))
packCorr.append(list(tracker))
packCorr.append(list(XData.columns.values.tolist()))
packCorr.append(json.dumps(columnsNames))
@ -1776,6 +1811,7 @@ def CompareFunPy():
global columnsKeep
global XDataGen
global IDsToCompare
global columnsNewGen
retrieveComparison = request.get_data().decode('utf8').replace("'", '"')
retrieveComparison = json.loads(retrieveComparison)
@ -1783,7 +1819,8 @@ def CompareFunPy():
IDsToCompare = retrieveComparison['getIDs']
XDataGen = XDataStored.copy()
columns = XData.columns.values.tolist()
columnsOriganl = keepOriginalFeatures.columns.values.tolist()
#columnsOriganl = XDataNoRemoval.columns.values.tolist()
columnsKeep = []
columnsKeepNonOrig = []
columnsKeepID = []
@ -1791,76 +1828,76 @@ def CompareFunPy():
if indx in IDsToCompare:
columnsKeepNonOrig.append(col)
columnExtracted = re.findall('\d+', col)
columnsKeep.append(columnsOriganl[int(columnExtracted[0]) - 1])
columnsKeepID.append(str(int(columnExtracted[0])))
columnsKeep.append(columnsNewGen[int(columnExtracted[0]) - 1])
columnsKeepID.append(str(col))
if (compareMode == 1):
XDataGen = XData[columnsKeepNonOrig]
feat1 = XDataGen.iloc[:,0]
feat2 = XDataGen.iloc[:,1]
XDataGen['F'+columnsKeepID[0]+'+F'+columnsKeepID[1]] = feat1 + feat2
XDataGen['|F'+columnsKeepID[0]+'-F'+columnsKeepID[1]+'|'] = abs(feat1 - feat2)
XDataGen['F'+columnsKeepID[0]+'xF'+columnsKeepID[1]] = feat1 * feat2
XDataGen['F'+columnsKeepID[0]+'/F'+columnsKeepID[1]] = feat1 / feat2
XDataGen['F'+columnsKeepID[1]+'/F'+columnsKeepID[0]] = feat2 / feat1
columnsKeep.append('F'+columnsKeepID[0]+'+F'+columnsKeepID[1])
columnsKeep.append('|F'+columnsKeepID[0]+'-F'+columnsKeepID[1]+'|')
columnsKeep.append('F'+columnsKeepID[0]+'xF'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[0]+'/F'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[1]+'/F'+columnsKeepID[0])
XDataGen[columnsKeepID[0]+'+'+columnsKeepID[1]] = feat1 + feat2
XDataGen['|'+columnsKeepID[0]+'-'+columnsKeepID[1]+'|'] = abs(feat1 - feat2)
XDataGen[columnsKeepID[0]+'x'+columnsKeepID[1]] = feat1 * feat2
XDataGen[columnsKeepID[0]+'/'+columnsKeepID[1]] = feat1 / feat2
XDataGen[columnsKeepID[1]+'/'+columnsKeepID[0]] = feat2 / feat1
columnsKeep.append(columnsKeepID[0]+'+'+columnsKeepID[1])
columnsKeep.append('|'+columnsKeepID[0]+'-'+columnsKeepID[1]+'|')
columnsKeep.append(columnsKeepID[0]+'x'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[0]+'/'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[1]+'/'+columnsKeepID[0])
elif (compareMode == 2):
XDataGen = XData[columnsKeepNonOrig]
feat1 = XDataGen.iloc[:,0]
feat2 = XDataGen.iloc[:,1]
feat3 = XDataGen.iloc[:,2]
XDataGen['F'+columnsKeepID[0]+'+F'+columnsKeepID[1]] = feat1 + feat2
XDataGen['F'+columnsKeepID[1]+'+F'+columnsKeepID[2]] = feat2 + feat3
XDataGen['F'+columnsKeepID[0]+'+F'+columnsKeepID[2]] = feat1 + feat3
XDataGen['F'+columnsKeepID[0]+'+F'+columnsKeepID[1]+'+F'+columnsKeepID[2]] = feat1 + feat2 + feat3
XDataGen['|F'+columnsKeepID[0]+'-F'+columnsKeepID[1]+'|'] = abs(feat1 - feat2)
XDataGen['|F'+columnsKeepID[1]+'-F'+columnsKeepID[2]+'|'] = abs(feat2 - feat3)
XDataGen['|F'+columnsKeepID[0]+'-F'+columnsKeepID[2]+'|'] = abs(feat1 - feat3)
XDataGen['|F'+columnsKeepID[0]+'-F'+columnsKeepID[1]+'-F'+columnsKeepID[2]+'|'] = abs(feat1 - feat2 - feat3)
XDataGen['F'+columnsKeepID[0]+'xF'+columnsKeepID[1]] = feat1 * feat2
XDataGen['F'+columnsKeepID[1]+'xF'+columnsKeepID[2]] = feat2 * feat3
XDataGen['F'+columnsKeepID[0]+'xF'+columnsKeepID[2]] = feat1 * feat3
XDataGen['F'+columnsKeepID[0]+'xF'+columnsKeepID[1]+'xF'+columnsKeepID[2]] = feat1 * feat2 * feat3
XDataGen['F'+columnsKeepID[0]+'/F'+columnsKeepID[1]] = feat1 / feat2
XDataGen['F'+columnsKeepID[1]+'/F'+columnsKeepID[0]] = feat2 / feat1
XDataGen['F'+columnsKeepID[1]+'/F'+columnsKeepID[2]] = feat2 / feat3
XDataGen['F'+columnsKeepID[2]+'/F'+columnsKeepID[1]] = feat3 / feat2
XDataGen['F'+columnsKeepID[0]+'/F'+columnsKeepID[2]] = feat1 / feat3
XDataGen['F'+columnsKeepID[2]+'/F'+columnsKeepID[0]] = feat3 / feat1
XDataGen['F'+columnsKeepID[0]+'/F'+columnsKeepID[1]+'/F'+columnsKeepID[2]] = feat1 / feat2 / feat3
XDataGen['F'+columnsKeepID[0]+'/F'+columnsKeepID[2]+'/F'+columnsKeepID[1]] = feat1 / feat3 / feat2
XDataGen['F'+columnsKeepID[1]+'/F'+columnsKeepID[2]+'/F'+columnsKeepID[0]] = feat2 / feat3 / feat1
XDataGen['F'+columnsKeepID[1]+'/F'+columnsKeepID[0]+'/F'+columnsKeepID[2]] = feat2 / feat1 / feat3
XDataGen['F'+columnsKeepID[2]+'/F'+columnsKeepID[0]+'/F'+columnsKeepID[1]] = feat3 / feat1 / feat2
XDataGen['F'+columnsKeepID[2]+'/F'+columnsKeepID[1]+'/F'+columnsKeepID[0]] = feat3 / feat2 / feat1
columnsKeep.append('F'+columnsKeepID[0]+'+F'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[1]+'+F'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[0]+'+F'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[0]+'+F'+columnsKeepID[1]+'+F'+columnsKeepID[2])
columnsKeep.append('|F'+columnsKeepID[0]+'-F'+columnsKeepID[1]+'|')
columnsKeep.append('|F'+columnsKeepID[1]+'-F'+columnsKeepID[2]+'|')
columnsKeep.append('|F'+columnsKeepID[0]+'-F'+columnsKeepID[2]+'|')
columnsKeep.append('|F'+columnsKeepID[0]+'-F'+columnsKeepID[1]+'-F'+columnsKeepID[2]+'|')
columnsKeep.append('F'+columnsKeepID[0]+'xF'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[1]+'xF'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[0]+'xF'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[0]+'xF'+columnsKeepID[1]+'xF'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[0]+'/F'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[1]+'/F'+columnsKeepID[0])
columnsKeep.append('F'+columnsKeepID[1]+'/F'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[2]+'/F'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[0]+'/F'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[2]+'/F'+columnsKeepID[0])
columnsKeep.append('F'+columnsKeepID[0]+'/F'+columnsKeepID[1]+'/F'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[0]+'/F'+columnsKeepID[2]+'/F'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[1]+'/F'+columnsKeepID[2]+'/F'+columnsKeepID[0])
columnsKeep.append('F'+columnsKeepID[1]+'/F'+columnsKeepID[0]+'/F'+columnsKeepID[2])
columnsKeep.append('F'+columnsKeepID[2]+'/F'+columnsKeepID[0]+'/F'+columnsKeepID[1])
columnsKeep.append('F'+columnsKeepID[2]+'/F'+columnsKeepID[1]+'/F'+columnsKeepID[0])
XDataGen[columnsKeepID[0]+'+'+columnsKeepID[1]] = feat1 + feat2
XDataGen[columnsKeepID[1]+'+'+columnsKeepID[2]] = feat2 + feat3
XDataGen[columnsKeepID[0]+'+'+columnsKeepID[2]] = feat1 + feat3
XDataGen[columnsKeepID[0]+'+'+columnsKeepID[1]+'+'+columnsKeepID[2]] = feat1 + feat2 + feat3
XDataGen['|'+columnsKeepID[0]+'-'+columnsKeepID[1]+'|'] = abs(feat1 - feat2)
XDataGen['|'+columnsKeepID[1]+'-'+columnsKeepID[2]+'|'] = abs(feat2 - feat3)
XDataGen['|'+columnsKeepID[0]+'-'+columnsKeepID[2]+'|'] = abs(feat1 - feat3)
XDataGen['|'+columnsKeepID[0]+'-'+columnsKeepID[1]+'-'+columnsKeepID[2]+'|'] = abs(feat1 - feat2 - feat3)
XDataGen[columnsKeepID[0]+'x'+columnsKeepID[1]] = feat1 * feat2
XDataGen[columnsKeepID[1]+'x'+columnsKeepID[2]] = feat2 * feat3
XDataGen[columnsKeepID[0]+'x'+columnsKeepID[2]] = feat1 * feat3
XDataGen[columnsKeepID[0]+'x'+columnsKeepID[1]+'x'+columnsKeepID[2]] = feat1 * feat2 * feat3
XDataGen[columnsKeepID[0]+'/'+columnsKeepID[1]] = feat1 / feat2
XDataGen[columnsKeepID[1]+'/'+columnsKeepID[0]] = feat2 / feat1
XDataGen[columnsKeepID[1]+'/'+columnsKeepID[2]] = feat2 / feat3
XDataGen[columnsKeepID[2]+'/'+columnsKeepID[1]] = feat3 / feat2
XDataGen[columnsKeepID[0]+'/'+columnsKeepID[2]] = feat1 / feat3
XDataGen[columnsKeepID[2]+'/'+columnsKeepID[0]] = feat3 / feat1
XDataGen[columnsKeepID[0]+'/'+columnsKeepID[1]+'/'+columnsKeepID[2]] = feat1 / feat2 / feat3
XDataGen[columnsKeepID[0]+'/'+columnsKeepID[2]+'/'+columnsKeepID[1]] = feat1 / feat3 / feat2
XDataGen[columnsKeepID[1]+'/'+columnsKeepID[2]+'/'+columnsKeepID[0]] = feat2 / feat3 / feat1
XDataGen[columnsKeepID[1]+'/'+columnsKeepID[0]+'/'+columnsKeepID[2]] = feat2 / feat1 / feat3
XDataGen[columnsKeepID[2]+'/'+columnsKeepID[0]+'/'+columnsKeepID[1]] = feat3 / feat1 / feat2
XDataGen[columnsKeepID[2]+'/'+columnsKeepID[1]+'/'+columnsKeepID[0]] = feat3 / feat2 / feat1
columnsKeep.append(columnsKeepID[0]+'+'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[1]+'+'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[0]+'+'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[0]+'+'+columnsKeepID[1]+'+'+columnsKeepID[2])
columnsKeep.append('|'+columnsKeepID[0]+'-'+columnsKeepID[1]+'|')
columnsKeep.append('|'+columnsKeepID[1]+'-'+columnsKeepID[2]+'|')
columnsKeep.append('|'+columnsKeepID[0]+'-'+columnsKeepID[2]+'|')
columnsKeep.append('|'+columnsKeepID[0]+'-'+columnsKeepID[1]+'-'+columnsKeepID[2]+'|')
columnsKeep.append(columnsKeepID[0]+'x'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[1]+'x'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[0]+'x'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[0]+'x'+columnsKeepID[1]+'x'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[0]+'/'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[1]+'/'+columnsKeepID[0])
columnsKeep.append(columnsKeepID[1]+'/'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[2]+'/'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[0]+'/'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[2]+'/'+columnsKeepID[0])
columnsKeep.append(columnsKeepID[0]+'/'+columnsKeepID[1]+'/'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[0]+'/'+columnsKeepID[2]+'/'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[1]+'/'+columnsKeepID[2]+'/'+columnsKeepID[0])
columnsKeep.append(columnsKeepID[1]+'/'+columnsKeepID[0]+'/'+columnsKeepID[2])
columnsKeep.append(columnsKeepID[2]+'/'+columnsKeepID[0]+'/'+columnsKeepID[1])
columnsKeep.append(columnsKeepID[2]+'/'+columnsKeepID[1]+'/'+columnsKeepID[0])
else:
pass
featureCompareData = estimatorFeatureSelection(XDataGen, estimator)

Loading…
Cancel
Save