@Test public void testIris() { System.out.println("Iris"); int[] expected = {22, 24, 20, 19, 16, 12, 11, 9, 6, 3, 4}; for (int i = 0; i <= 10; i++) { double alpha = i * 0.1; int[] prediction = LOOCV.classification(Iris.x, Iris.y, (x, y) -> RDA.fit(x, y, alpha)); int error = Error.of(Iris.y, prediction); System.out.format("alpha = %.1f, error = %d%n", alpha, error); assertEquals(expected[i], error); } }
public static RDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
RDA extends QDA { public static RDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
RDA extends QDA { public static RDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } RDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling);  RDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling, IntSet labels); }
RDA extends QDA { public static RDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } RDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling);  RDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling, IntSet labels); static RDA fit(Formula formula, DataFrame data); static RDA fit(Formula formula, DataFrame data, Properties prop); static RDA fit(double[][] x, int[] y, Properties prop); static RDA fit(double[][] x, int[] y, double alpha); static RDA fit(double[][] x, int[] y, double alpha, double[] priori, double tol); }
RDA extends QDA { public static RDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } RDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling);  RDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling, IntSet labels); static RDA fit(Formula formula, DataFrame data); static RDA fit(Formula formula, DataFrame data, Properties prop); static RDA fit(double[][] x, int[] y, Properties prop); static RDA fit(double[][] x, int[] y, double alpha); static RDA fit(double[][] x, int[] y, double alpha, double[] priori, double tol);  }