def trainClassifierOnTrainingDataReturnAll(numberOfTrainingExamples = -1): trainData = dataReader.getTrainData(numberOfTrainingExamples) # feature engineering trainData = featureExtractor.convertTargetFeatureToNumeric(trainData) xTrain, yTrain = featureExtractor.getRegularFeatures(trainData, True) # classifier training classifier = classifierSelector.trainClassifier(xTrain, yTrain) return classifier, xTrain, yTrain
def trainClassifierOnTrainingData(trainData=None, numberOfTrainingExamples = -1, margins=None): if trainData is None: trainData = dataReader.getTrainData(numberOfTrainingExamples,margins) # feature engineering trainData = regularFeatExtr.convertTargetFeatureToNumeric(trainData) xTrain, yTrain = regularFeatExtr.getRegularFeatures(trainData, True) # classifier training classifier = classifierSelector.trainClassifier(xTrain, yTrain) return classifier