parameters: (self, data, **args)
docstring: :Keywords:
            - `train` - boolean - whether to train the best classifier
              (default: True)
            - `vdata` - data to use for testing instead of using cross-validation
              (not implemented yet)
docstring_summary: :Keywords:
            - `train` - boolean - whether to train the best classifier
              (default: True)
            - `vdata` - data to use for testing instead of using cross-validation
              (not implemented yet)
docstring_tokens: : Keywords : - train - boolean - whether to train the best classifier ( default : True ) - vdata - data to use for testing instead of using cross - validation ( not implemented yet )
function: def train(self, data, **args) :
          """
          :Keywords:
            - `train` - boolean - whether to train the best classifier
              (default: True)
            - `vdata` - data to use for testing instead of using cross-validation
              (not implemented yet)
          """
          Classifier.train(self, data, **args)
  
          kernel = ker.Gaussian()
          gammaSelect = ModelSelector(Param(svm.SVM(kernel, C = self.Clow),
                                            'kernel.gamma', self.gamma),
                                      measure = self.measure,
                                      numFolds = self.numFolds)
          gammaSelect.train(data)
  
          kernel = ker.Gaussian(gamma = gammaSelect.classifier.kernel.gamma)
          cSelect = ModelSelector(Param(svm.SVM(kernel), 'C', self.C),
                                  measure = self.measure,
                                  numFolds = self.numFolds)
          cSelect.train(data)
          
          self.classifier = cSelect.classifier.__class__(cSelect.classifier)
  
          if 'train' not in args or args['train'] is True :
              self.classifier.train(data, **args)
          
          self.classifier.log.trainingTime = self.getTrainingTime()
          self.classifier.log.classifier = self.classifier.__class__(self.classifier)
function_tokens: def train ( self , data , * * args ) : Classifier . train ( self , data , * * args ) kernel = ker . Gaussian ( ) gammaSelect = ModelSelector ( Param ( svm . SVM ( kernel , C = self . Clow ) , 'kernel.gamma' , self . gamma ) , measure = self . measure , numFolds = self . numFolds ) gammaSelect . train ( data ) kernel = ker . Gaussian ( gamma = gammaSelect . classifier . kernel . gamma ) cSelect = ModelSelector ( Param ( svm . SVM ( kernel ) , 'C' , self . C ) , measure = self . measure , numFolds = self . numFolds ) cSelect . train ( data ) self . classifier = cSelect . classifier . __class__ ( cSelect . classifier ) if 'train' not in args or args [ 'train' ] is True : self . classifier . train ( data , * * args ) self . classifier . log . trainingTime = self . getTrainingTime ( ) self . classifier . log . classifier = self . classifier . __class__ ( self . classifier )