original_docstring:  Executes the classifier on the given data vector in the linear case
          
          prediction value = <w,data>+b
          
docstring: Executes the classifier on the given data vector in the linear case
  prediction value = +b
docstring_tokens: Executes the classifier on the given data vector in the linear case prediction value = + b
code: def _execute(self, x):
          """ Executes the classifier on the given data vector in the linear case
          
          prediction value = <w,data>+b
          """
          if self.kernel_type == 'LINEAR':
              data = x.view(numpy.ndarray)
              # Let the SVM classify the given data: <w,data>+b
              if self.w is None:
                  prediction_value = 0
                  self.w = numpy.zeros(x.shape[1])
              else:
                  prediction_value = float(numpy.dot(self.w.T, data[0, :]))+self.b
              # one-class multinomial handling of REST class
              if "REST" in self.classes and self.multinomial:
                  if "REST" == self.classes[0]:
                      label = self.classes[1]
                  elif "REST" == self.classes[1]:
                      label = self.classes[0]
                      prediction_value *= -1
              # Look up class label
              # prediction_value --> {-1,1} --> {0,1} --> Labels
              elif prediction_value > 0:
                  label = self.classes[1]
              else:
                  label = self.classes[0]
              
              return PredictionVector(label=label, prediction=prediction_value,
                                      predictor=self)
code_tokens: def _execute ( self , x ) : if self . kernel_type == 'LINEAR' : data = x . view ( numpy . ndarray ) if self . w is None : prediction_value = 0 self . w = numpy . zeros ( x . shape [ 1 ] ) else : prediction_value = float ( numpy . dot ( self . w . T , data [ 0 , : ] ) ) + self . b if "REST" in self . classes and self . multinomial : if "REST" == self . classes [ 0 ] : label = self . classes [ 1 ] elif "REST" == self . classes [ 1 ] : label = self . classes [ 0 ] prediction_value *= - 1 elif prediction_value > 0 : label = self . classes [ 1 ] else : label = self . classes [ 0 ] return PredictionVector ( label = label , prediction = prediction_value , predictor = self )
short_docstring: Executes the classifier on the given data vector in the linear case
  prediction value = <w,data>+b
short_docstring_tokens: Executes the classifier on the given data vector in the linear case prediction value = <w data > + b
comment: """ Executes the classifier on the given data vector in the linear case
          
          prediction value = <w,data>+b
          """$SEP$# Let the SVM classify the given data: <w,data>+b$SEP$# one-class multinomial handling of REST class$SEP$# Look up class label$SEP$# prediction_value --> {-1,1} --> {0,1} --> Labels