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