Exemplo n.º 1
0
 def preProcessExamples(self, allExamples):
     # Duplicates cannot be removed here, as they should only be removed from the training set. This is done
     # in the classifier.
     #        if "no_duplicates" in self.styles:
     #            count = len(allExamples)
     #            print >> sys.stderr, " Removing duplicates,",
     #            allExamples = ExampleUtils.removeDuplicates(allExamples)
     #            print >> sys.stderr, "removed", count - len(allExamples)
     if "normalize" in self.styles:
         print >> sys.stderr, " Normalizing feature vectors"
         ExampleUtils.normalizeFeatureVectors(allExamples)
     return allExamples
    def preProcessExamples(self, allExamples):
        # Duplicates cannot be removed here, as they should only be removed from the training set. This is done
        # in the classifier.
#        if "no_duplicates" in self.styles:
#            count = len(allExamples)
#            print >> sys.stderr, " Removing duplicates,", 
#            allExamples = ExampleUtils.removeDuplicates(allExamples)
#            print >> sys.stderr, "removed", count - len(allExamples)
        if "normalize" in self.styles:
            print >> sys.stderr, " Normalizing feature vectors"
            ExampleUtils.normalizeFeatureVectors(allExamples)
        return allExamples   
Exemplo n.º 3
0
 def preProcessExamples(self, allExamples):
     if "normalize" in self.styles:
         print >> sys.stderr, " Normalizing feature vectors"
         ExampleUtils.normalizeFeatureVectors(allExamples)
     return allExamples   
Exemplo n.º 4
0
 def preProcessExamples(self, allExamples):
     if "normalize" in self.styles:
         print >> sys.stderr, " Normalizing feature vectors"
         ExampleUtils.normalizeFeatureVectors(allExamples)
     return allExamples