def sequentialBackwardSelection(naFeatTrain,naFeatTest,lFeatures,classLabelIndex):
	lSelectedFeatures = lFeatures[:]
	lCorrCoef = list()
	lRemovedFeatures = list()
	while 0 > len(lSelectedFeatures):
		sys.stdout.write('lSelectedFeatures: ' + str(lSelectedFeatures) + '\n')
		sys.stdout.write('lRemovedFeatures: ' + str(lRemovedFeatures) + '\n')
		sys.stdout.write('lCorrCoef: ' + str(lCorrCoef) + '\n')
		retValue = nextWorstFeature(naFeatTrain,naFeatTest,lSelectedFeatures,classLabelIndex)
		lSelectedFeatures.remove(retValue['worstFeature'])
		lCorrCoef.append(retValue['worstFeatureCorrCoef'])
		lRemovedFeatures.append(retValue['worstFeature'])
		
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	lBestSet = list(set(lFeatures) - set(lRemovedFeatures[0:maxlCorrCoefIndex+1]))
	sys.stdout.write('best feature set is ' + str(lBestSet+[classLabelIndex]) + '\n')
	sys.stdout.write('corr coef = ' + str(maxlCorrCoef))
	return maxlCorrCoef
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/Examples/FeatureSearch/functions.py/sequentialBackwardSelection/swapped operands of `>`