def sequentialForwardSelection(naFeatTrain,naFeatTest,lFeatures,classLabelIndex):
	lSelectedFeatures = list()
	lRemainingFeatures = lFeatures[:]
	lCorrCoef = list();
	while len(lRemainingFeatures) > 0:
		sys.stdout.write('lSelectedFeatures: ' + str(lSelectedFeatures) + '\n')
		sys.stdout.write('lRemainingFeatures: ' + str(lRemainingFeatures) + '\n')
		sys.stdout.write('lCorrCoef: ' + str(lCorrCoef) + '\n')
		retValue = nextBestFeature(naFeatTrain,naFeatTest,lSelectedFeatures,lRemainingFeatures,classLabelIndex)
		lSelectedFeatures.append(retValue['bestFeature'])
		lRemainingFeatures.remove(retValue['bestFeature'])
		lCorrCoef.append(retValue['bestFeatureCorrCoef'])
		
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	sys.stdout.write('best feature set is ' + str(lSelectedFeatures[0:maxlCorrCoefIndex+1]+[classLabelIndex]) + '\n')
	sys.stdout.write('corr coef = ' + str(maxlCorrCoef))
	return maxlCorrCoef
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/Examples/FeatureSearch/functions.py/sequentialForwardSelection/original