private PerformanceVector count(KernelModel model,PerformanceVector performanceCriteria) throws OperatorException {
  if (performanceCriteria == null) {
    performanceCriteria=new PerformanceVector();
  }
  this.lastCount=0;
  int svNumber=model.getNumberOfSupportVectors();
  for (int i=0; i < svNumber; i++) {
    SupportVector sv=model.getSupportVector(i);
    if (Math.abs(sv.getAlpha()) > 0.0d) {
      this.lastCount++;
    }
  }
  EstimatedPerformance svCriterion=new EstimatedPerformance("number_of_support_vectors",lastCount,1,getParameterAsInt(PARAMETER_OPTIMIZATION_DIRECTION) == MDLCriterion.MINIMIZATION);
  performanceCriteria.addCriterion(svCriterion);
  return performanceCriteria;
}

private PerformanceVector count ( KernelModel model , PerformanceVector performanceCriteria ) throws OperatorException { if ( performanceCriteria == null ) { performanceCriteria = new PerformanceVector ( ) ; } this . lastCount = 0 ; int svNumber = model . getNumberOfSupportVectors ( ) ; for ( int i = 0 ; i < svNumber ; i ++ ) { SupportVector sv = model . getSupportVector ( i ) ; if ( Math . abs ( sv . getAlpha ( ) ) > 0.0d ) { this . lastCount ++ ; } } EstimatedPerformance svCriterion = new EstimatedPerformance ( "number_of_support_vectors" , lastCount , 1 , getParameterAsInt ( PARAMETER_OPTIMIZATION_DIRECTION ) == MDLCriterion . MINIMIZATION ) ; performanceCriteria . addCriterion ( svCriterion ) ; return performanceCriteria ; }
creates a new performance vector if the given one is null . adds a new estimated criterion . if the criterion was already part of the performance vector before it will be overwritten .
