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

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

        RegressionValidations<RBFNetwork<double[]>> result = CrossValidation.regression(10, Planes.x, Planes.y,
                (xi, yi) -> RBFNetwork.fit(xi, yi, RBF.fit(xi, 20, 5.0)));

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