def nextWorstFeature(naFeatTrain,naFeatTest,lSelectedFeatures,classLabelIndex):
	sys.stdout.write('nextWorstFeature\n')

	if len(lSelectedFeatures) == 1:
		sys.stdout.write('nextWorstFeature: ' + str(lSelectedFeatures[0]) + '\n')
		sys.stdout.write('worstFeatureCorrCoef: ' + str(-999) + '\n\n')
		return {'worstFeature':lSelectedFeatures[0],'worstFeatureCorrCoef':-999}

	worstFeature = -1
	worstFeatureCorrCoef = 0
	for x in lSelectedFeatures:
		lSelectedFeaturesCopy = lSelectedFeatures[:]
		lSelectedFeaturesCopy.remove(x);			
		lCurrentFeatureSet = lSelectedFeaturesCopy + [classLabelIndex]
		sys.stdout.write('testing feature set ' +  str(lCurrentFeatureSet))
		currentTrain = naFeatTrain[:,lCurrentFeatureSet]
		currentTest = naFeatTest[:,lCurrentFeatureSet]
		currentCorrCoef = learnerTest(currentTrain,currentTest)
		sys.stdout.write(' :: corr coef = ' + str(currentCorrCoef) + '\n')
		if worstFeature == -1 or currentCorrCoef < worstFeatureCorrCoef:
			worstFeature = x
			worstFeatureCorrCoef = currentCorrCoef
			
	sys.stdout.write('nextWorstFeature: ' + str(worstFeature) + '\n')
	sys.stdout.write('worstFeatureCorrCoef: ' + str(worstFeatureCorrCoef) + '\n\n')
	return {'worstFeature':worstFeature,'worstFeatureCorrCoef':worstFeatureCorrCoef}
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/Examples/FeatureSearch/functions.py/nextWorstFeature/swapped operands of `<`