public KernelBasisFunction[] createKernels(double[][] x,int numKernels) throws OperatorException {
  KernelBasisFunction[] kernels=new KernelBasisFunction[numKernels];
  KernelBasisFunction kernel=null;
  double[] input;
  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);
  for (int j=0; j < numKernels - 1; j++) {
    input=x[j];
switch (getParameterAsInt(PARAMETER_KERNEL_TYPE)) {
case 0:
      kernel=new KernelBasisFunction(new KernelRadial(lengthScale),input);
    break;
case 1:
  kernel=new KernelBasisFunction(new KernelCauchy(lengthScale),input);
break;
case 2:
kernel=new KernelBasisFunction(new KernelLaplace(lengthScale),input);
break;
case 3:
kernel=new KernelBasisFunction(new KernelPoly(lengthScale,bias,degree),input);
break;
case 4:
kernel=new KernelBasisFunction(new KernelSigmoid(a,b),input);
break;
case 5:
kernel=new KernelBasisFunction(new KernelEpanechnikov(sigma1,degree),input);
break;
case 6:
kernel=new KernelBasisFunction(new KernelGaussianCombination(sigma1,sigma2,sigma3),input);
break;
case 7:
kernel=new KernelBasisFunction(new KernelMultiquadric(sigma1,shift),input);
break;
default :
kernel=new KernelBasisFunction(new KernelRadial(lengthScale),input);
}
kernels[j + 1]=kernel;
}
return kernels;
}

public KernelBasisFunction [ ] createKernels ( double [ ] [ ] x , int numKernels ) throws OperatorException { KernelBasisFunction [ ] kernels = new KernelBasisFunction [ numKernels ] ; KernelBasisFunction kernel = null ; double [ ] input ; 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 ) ; for ( int j = 0 ; j < numKernels - 1 ; j ++ ) { input = x [ j ] ; switch ( getParameterAsInt ( PARAMETER_KERNEL_TYPE ) ) { case 0 : kernel = new KernelBasisFunction ( new KernelRadial ( lengthScale ) , input ) ; break ; case 1 : kernel = new KernelBasisFunction ( new KernelCauchy ( lengthScale ) , input ) ; break ; case 2 : kernel = new KernelBasisFunction ( new KernelLaplace ( lengthScale ) , input ) ; break ; case 3 : kernel = new KernelBasisFunction ( new KernelPoly ( lengthScale , bias , degree ) , input ) ; break ; case 4 : kernel = new KernelBasisFunction ( new KernelSigmoid ( a , b ) , input ) ; break ; case 5 : kernel = new KernelBasisFunction ( new KernelEpanechnikov ( sigma1 , degree ) , input ) ; break ; case 6 : kernel = new KernelBasisFunction ( new KernelGaussianCombination ( sigma1 , sigma2 , sigma3 ) , input ) ; break ; case 7 : kernel = new KernelBasisFunction ( new KernelMultiquadric ( sigma1 , shift ) , input ) ; break ; default : kernel = new KernelBasisFunction ( new KernelRadial ( lengthScale ) , input ) ; } kernels [ j + 1 ] = kernel ; } return kernels ; }
create the appropriate kernel functions depending on the ui settings .
