Example #1
0
 def _execute(self, data):
     result = RMM2Node._execute(self, data)
     label = result.label
     prediction = result.prediction + 1
     if self.outer_boundary and \
             prediction < (-1.0 * self.range + 1) * 0.5:
         prediction = (-1.0 * self.range + 1) - prediction
     if prediction > 0:
         label = self.classes[1]
     elif 0 >= prediction:
         label = self.classes[0]
     return PredictionVector(prediction=prediction,
                             label=label,
                             predictor=self)
Example #2
0
 def _execute(self, data):
     result = RMM2Node._execute(self, data)
     label = result.label
     prediction = result.prediction + 1
     if self.outer_boundary and \
             prediction < (-1.0 * self.range + 1) * 0.5:
         prediction = (-1.0 * self.range + 1) - prediction
     if prediction > 0:
         label = self.classes[1]
     elif 0 >= prediction:
         label = self.classes[0]
     return PredictionVector(prediction=prediction,
                             label=label,
                             predictor=self)