public static Regression<double[]> fit(double[][] x, double[] y, double eps, double C, double tol) {
        smile.base.svm.SVR<double[]> svr = new smile.base.svm.SVR<>(new LinearKernel(), eps, C, tol);
        KernelMachine<double[]> svm = svr.fit(x, y);

        return new Regression<>() {
            final LinearKernelMachine model = LinearKernelMachine.of(svm);

            @Override
            public double predict(double[] x) {
                return model.f(x);
            }
        };
    }
@Test
    public void testCPU() {
        System.out.println("CPU");

        double[][] x = MathEx.clone(CPU.x);
        MathEx.standardize(x);

        MathEx.setSeed(19650218); // to get repeatable results.
        RegressionValidations<Regression<double[]>> result = CrossValidation.regression(10, x, CPU.y,
                (xi, yi) -> SVM.fit(xi, yi,40.0, 10.0, 1E-3));

        System.out.println(result);
        assertEquals(47.1872, result.avg.rmse, 1E-4);
    }