public static <T> RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf) {
        return fit(x, y, rbf, false);
    }
@Test
    public void testPenDigits() {
        System.out.println("Pen Digits");

        MathEx.setSeed(19650218); // to get repeatable results.
        ClassificationValidations<RBFNetwork<double[]>> result = CrossValidation.classification(10, PenDigits.x, PenDigits.y,
                (x, y) -> RBFNetwork.fit(x, y, RBF.fit(x, 50)));

        System.out.println("RBF Network: " + result);
        assertEquals(0.9162, result.avg.accuracy, 1E-4);

        result = CrossValidation.classification(10, PenDigits.x, PenDigits.y,
                (x, y) -> RBFNetwork.fit(x, y, RBF.fit(x, 50), true));

        System.out.println("Normalized RBF Network: " + result);
        assertEquals(0.9190, result.avg.accuracy, 1E-4);
    }