public Kernel createKernel() throws OperatorException {
  Kernel kernel=null;
  double lengthScale=getParameterAsDouble(PARAMETER_KERNEL_LENGTHSCALE);
  double bias=getParameterAsDouble(PARAMETER_KERNEL_BIAS);
  double degree=getParameterAsDouble(PARAMETER_KERNEL_DEGREE);
  double a=getParameterAsDouble(PARAMETER_KERNEL_A);
  double b=getParameterAsDouble(PARAMETER_KERNEL_B);
  double sigma1=getParameterAsDouble(PARAMETER_KERNEL_SIGMA1);
  double sigma2=getParameterAsDouble(PARAMETER_KERNEL_SIGMA2);
  double sigma3=getParameterAsDouble(PARAMETER_KERNEL_SIGMA3);
  double shift=getParameterAsDouble(PARAMETER_KERNEL_SHIFT);
switch (getParameterAsInt(PARAMETER_KERNEL_TYPE)) {
case 0:
    kernel=new KernelRadial(lengthScale);
  break;
case 1:
kernel=new KernelCauchy(lengthScale);
break;
case 2:
kernel=new KernelLaplace(lengthScale);
break;
case 3:
kernel=new KernelPoly(lengthScale,bias,degree);
break;
case 4:
kernel=new KernelSigmoid(a,b);
break;
case 5:
kernel=new KernelEpanechnikov(sigma1,degree);
break;
case 6:
kernel=new KernelGaussianCombination(sigma1,sigma2,sigma3);
break;
case 7:
kernel=new KernelMultiquadric(sigma1,shift);
break;
default :
kernel=new KernelRadial(lengthScale);
}
return kernel;
}

public Kernel createKernel ( ) throws OperatorException { Kernel kernel = null ; double lengthScale = getParameterAsDouble ( PARAMETER_KERNEL_LENGTHSCALE ) ; double bias = getParameterAsDouble ( PARAMETER_KERNEL_BIAS ) ; double degree = getParameterAsDouble ( PARAMETER_KERNEL_DEGREE ) ; double a = getParameterAsDouble ( PARAMETER_KERNEL_A ) ; double b = getParameterAsDouble ( PARAMETER_KERNEL_B ) ; double sigma1 = getParameterAsDouble ( PARAMETER_KERNEL_SIGMA1 ) ; double sigma2 = getParameterAsDouble ( PARAMETER_KERNEL_SIGMA2 ) ; double sigma3 = getParameterAsDouble ( PARAMETER_KERNEL_SIGMA3 ) ; double shift = getParameterAsDouble ( PARAMETER_KERNEL_SHIFT ) ; switch ( getParameterAsInt ( PARAMETER_KERNEL_TYPE ) ) { case 0 : kernel = new KernelRadial ( lengthScale ) ; break ; case 1 : kernel = new KernelCauchy ( lengthScale ) ; break ; case 2 : kernel = new KernelLaplace ( lengthScale ) ; break ; case 3 : kernel = new KernelPoly ( lengthScale , bias , degree ) ; break ; case 4 : kernel = new KernelSigmoid ( a , b ) ; break ; case 5 : kernel = new KernelEpanechnikov ( sigma1 , degree ) ; break ; case 6 : kernel = new KernelGaussianCombination ( sigma1 , sigma2 , sigma3 ) ; break ; case 7 : kernel = new KernelMultiquadric ( sigma1 , shift ) ; break ; default : kernel = new KernelRadial ( lengthScale ) ; } return kernel ; }
create the appropriate kernel function depending on the rapidminer - ui settings .
