@Test public void testBreastCancer() { System.out.println("Breast Cancer"); MathEx.setSeed(19650218); int[] prediction = CrossValidation.classification(10, BreastCancer.x, BreastCancer.y, (x, y) -> RBFNetwork.fit(x, y, RBF.fit(x, 30))); int error = Error.of(BreastCancer.y, prediction); System.out.println("RBF Network Error = " + error); assertEquals(32, error); prediction = CrossValidation.classification(10, BreastCancer.x, BreastCancer.y, (x, y) -> RBFNetwork.fit(x, y, RBF.fit(x, 30), true)); error = Error.of(BreastCancer.y, prediction); System.out.println("Normalized RBF Network Error = " + error); assertEquals(38, error); }
public static <T> RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf) { return fit(x, y, rbf, false); }
RBFNetwork implements Classifier<T> { public static <T> RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf) { return fit(x, y, rbf, false); } }
RBFNetwork implements Classifier<T> { public static <T> RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf) { return fit(x, y, rbf, false); } RBFNetwork(int k, RBF<T>[] rbf, Matrix w, boolean normalized);  RBFNetwork(int k, RBF<T>[] rbf, Matrix w, boolean normalized, IntSet labels); }
RBFNetwork implements Classifier<T> { public static <T> RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf) { return fit(x, y, rbf, false); } RBFNetwork(int k, RBF<T>[] rbf, Matrix w, boolean normalized);  RBFNetwork(int k, RBF<T>[] rbf, Matrix w, boolean normalized, IntSet labels); static RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf); static RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf, boolean normalized); boolean isNormalized(); @Override int predict(T x); }
RBFNetwork implements Classifier<T> { public static <T> RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf) { return fit(x, y, rbf, false); } RBFNetwork(int k, RBF<T>[] rbf, Matrix w, boolean normalized);  RBFNetwork(int k, RBF<T>[] rbf, Matrix w, boolean normalized, IntSet labels); static RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf); static RBFNetwork<T> fit(T[] x, int[] y, RBF<T>[] rbf, boolean normalized); boolean isNormalized(); @Override int predict(T x);  }