def nextBestFeature(naFeatTrain,naFeatTest,lSelectedFeatures,lRemainingFeatures,classLabelIndex):
	sys.stdout.write('nextBestFeature\n')
	
	bestFeature = -1
	bestFeatureCorrCoef = 0
	for x in lRemainingFeatures:
		lCurrentFeatureSet = [x]+lSelectedFeatures+[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 bestFeature == -1 or currentCorrCoef < bestFeatureCorrCoef:
			bestFeature = x
			bestFeatureCorrCoef = currentCorrCoef
			
	sys.stdout.write('nextBestFeature: ' + str(bestFeature) + '\n')
	sys.stdout.write('bestFeatureCorrCoef: ' + str(bestFeatureCorrCoef) + '\n\n')
	return {'bestFeature':bestFeature,'bestFeatureCorrCoef':bestFeatureCorrCoef}
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/Examples/FeatureSearch/functions.py/nextBestFeature/swapped operands of `<`