public static <T> RBFNetwork<T> fit(T[] x, double[] y, RBF<T>[] rbf) {
        return fit(x, y, rbf, false);
    }
@Test
    public void testLongley() throws Exception {
        System.out.println("longley");

        MathEx.setSeed(19650218); // to get repeatable results.

        double[][] x = MathEx.clone(Longley.x);
        MathEx.standardize(x);
        RegressionMetrics metrics = LOOCV.regression(x, Longley.y,
                (xi, yi) -> RBFNetwork.fit(xi, yi, RBF.fit(xi, 10, 5.0)));

        System.out.println(metrics);
        assertEquals(4.922188709128203, metrics.rmse, 1E-4);

        RBFNetwork<double[]> model = RBFNetwork.fit(Longley.x, Longley.y, RBF.fit(Longley.x, 10, 5.0));
        java.nio.file.Path temp = Write.object(model);
        Read.object(temp);
    }