public EvoSVMModel(ExampleSet exampleSet,List<SupportVector> supportVectors,Kernel kernel,double bias){
  super(exampleSet,ExampleSetUtilities.SetsCompareOption.ALLOW_SUPERSET,ExampleSetUtilities.TypesCompareOption.ALLOW_SAME_PARENTS);
  this.supportVectors=supportVectors;
  if (supportVectors == null || supportVectors.size() == 0) {
    throw new IllegalArgumentException("Null or empty support vector collection: not possible to predict values!");
  }
  this.kernel=kernel;
  this.bias=bias;
  if (this.kernel instanceof DotKernel) {
    this.weights=new double[getNumberOfAttributes()];
    for (int i=0; i < getNumberOfSupportVectors(); i++) {
      SupportVector sv=getSupportVector(i);
      if (sv != null) {
        double[] x=sv.getX();
        double alpha=sv.getAlpha();
        double y=sv.getY();
        for (int j=0; j < weights.length; j++) {
          weights[j]+=y * alpha * x[j];
        }
      }
 else {
        this.weights=null;
        break;
      }
    }
  }
}

public EvoSVMModel ( ExampleSet exampleSet , List < SupportVector > supportVectors , Kernel kernel , double bias ) { super ( exampleSet , ExampleSetUtilities . SetsCompareOption . ALLOW_SUPERSET , ExampleSetUtilities . TypesCompareOption . ALLOW_SAME_PARENTS ) ; this . supportVectors = supportVectors ; if ( supportVectors == null || supportVectors . size ( ) == 0 ) { throw new IllegalArgumentException ( "Null or empty support vector collection: not possible to predict values!" ) ; } this . kernel = kernel ; this . bias = bias ; if ( this . kernel instanceof DotKernel ) { this . weights = new double [ getNumberOfAttributes ( ) ] ; for ( int i = 0 ; i < getNumberOfSupportVectors ( ) ; i ++ ) { SupportVector sv = getSupportVector ( i ) ; if ( sv != null ) { double [ ] x = sv . getX ( ) ; double alpha = sv . getAlpha ( ) ; double y = sv . getY ( ) ; for ( int j = 0 ; j < weights . length ; j ++ ) { weights [ j ] += y * alpha * x [ j ] ; } } else { this . weights = null ; break ; } } } }
creates a classification model .
