private double kernel(FeatureNode [] x, FeatureNode [] z) {
                double ret = 0;
                switch (model.params.kernel) {
                case 0: //user defined
                        break;
                case 1: //linear
                        ret = Kernel.kLinear(x, z);
                        break;
                case 2: //polynomial
                        ret = Kernel.kPoly(x, z, model.params.a, model.params.b, model.params.c);
                        break;
                case 3: //gaussian
                        ret = Kernel.kGaussian(x, z, model.params.a);
                        break;
                case 4: //tanh
                        ret = Kernel.kTanh(x, z, model.params.a, model.params.b);
                        break;
                }
                return ret;
        }