public static GaussianProcessRegression<double[]> fit(double[][] x, double[] y, Properties params) {
        MercerKernel<double[]> kernel = MercerKernel.of(params.getProperty("smile.gaussian_process.kernel", "linear"));
        double noise = Double.parseDouble(params.getProperty("smile.gaussian_process.noise", "1E-10"));
        boolean normalize = Boolean.parseBoolean(params.getProperty("smile.gaussian_process.normalize", "true"));
        double tol = Double.parseDouble(params.getProperty("smile.gaussian_process.tolerance", "1E-5"));
        int maxIter = Integer.parseInt(params.getProperty("smile.gaussian_process.iterations", "0"));
        return fit(x, y, kernel, noise, normalize, tol, maxIter);
    }
@Test
    public void testOutOfBoundsException() throws Exception {
        double[][] X = {
                {4.543,  3.135, 0.86},
                {5.159,  5.043, 1.53},
                {5.366,  5.438, 1.57},
                {5.759,  7.496, 1.81},
                {4.663,  3.807, 0.99},
                {5.697,  7.601, 1.09},
                {5.892,  8.726, 1.29},
                {6.078,  7.966, 1.78},
                {4.898,  3.85,  1.29},
                {5.242,  4.174, 1.58},
                {5.74 ,  6.142, 1.68},
                {6.446,  7.908, 1.9 },
                {4.477,  2.996, 1.06},
                {5.236,  4.942, 1.3 },
                {6.151,  6.752, 1.52},
                {6.365,  9.588, 1.74},
                {4.787,  3.912, 1.16},
                {5.412,  4.7  , 1.49},
                {5.247,  6.174, 1.63},
                {5.438,  9.064, 1.99},
                {4.564,  4.949, 1.15},
                {5.298,  5.22,  1.33},
                {5.455,  9.242, 1.44},
                {5.855, 10.199, 2   },
                {5.366,  3.664, 1.31},
                {6.043,  3.219, 1.46},
                {6.458,  6.962, 1.72},
                {5.328,  3.912, 1.25},
                {5.802,  6.685, 1.08},
                {6.176,  4.787, 1.25}
        };
        double[] y = {
                12.3, 20.9, 39, 47.9, 5.6, 25.9, 37.3, 21.9, 18.1, 21, 34.9, 57.2, 0.7, 25.9, 54.9,
                40.9, 15.9, 6.4, 18, 38.9, 14, 15.2, 32, 56.71, 16.8, 11.6, 26.5, 0.7, 13.4, 5.5
        };

        GaussianProcessRegression model = GaussianProcessRegression.fit(
                X, y, new GaussianKernel(3),
                1e-5, false, 1e-5, 1024
        );
        System.out.println(model);
    }