Exemplo n.º 1
0
 def makeDecision(self, config, save=True):
     """
     Function making the decision upon the predicted probas from analyze
     method.
     Each file is dealt with as a Recording object, created, loaded,
     decisions are made, and saved again.
     See Recording.makeDecision for more info.
     """
     if self._verbatim > 0:
         print(
             '\n\n *** DATASET ANALYSIS: MAKING DECISION ON PREDICTIONS ***'
         )
     tStartGlobal = time.time()
     for file_path in self.files:
         recording = Recording(file_path, config, verbatim=self._verbatim)
         recording.load(config)
         tStart = time.time()
         recording.makeDecision(config)
         tEnd = time.time()
         if save:
             recording.save(config)
         if self._verbatim > 1:
             print(
                 '\tRecording has been re-analyzed: decisions on predictions have been made',
                 file_path, tEnd - tStart)
     tEndGlobal = time.time()
     if self._verbatim > 0:
         print(
             'Dataset has been re-analyzed: decisions on predictions have been made',
             tEndGlobal - tStartGlobal)
     return