@Test public void testIris() { System.out.println("Iris"); int[] prediction = LOOCV.classification(Iris.x, Iris.y, (x, y) -> LDA.fit(x, y)); int error = Error.of(Iris.y, prediction); System.out.println("Error = " + error); assertEquals(22, error); }
public static LDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
LDA implements SoftClassifier<double[]> { public static LDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
LDA implements SoftClassifier<double[]> { public static LDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } LDA(double[] priori, double[][] mu, double[] eigen, Matrix scaling);  LDA(double[] priori, double[][] mu, double[] eigen, Matrix scaling, IntSet labels); }
LDA implements SoftClassifier<double[]> { public static LDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } LDA(double[] priori, double[][] mu, double[] eigen, Matrix scaling);  LDA(double[] priori, double[][] mu, double[] eigen, Matrix scaling, IntSet labels); static LDA fit(Formula formula, DataFrame data); static LDA fit(Formula formula, DataFrame data, Properties prop); static LDA fit(double[][] x, int[] y); static LDA fit(double[][] x, int[] y, Properties prop); static LDA fit(double[][] x, int[] y, double[] priori, double tol); double[] priori(); @Override int predict(double[] x); @Override int predict(double[] x, double[] posteriori); }
LDA implements SoftClassifier<double[]> { public static LDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } LDA(double[] priori, double[][] mu, double[] eigen, Matrix scaling);  LDA(double[] priori, double[][] mu, double[] eigen, Matrix scaling, IntSet labels); static LDA fit(Formula formula, DataFrame data); static LDA fit(Formula formula, DataFrame data, Properties prop); static LDA fit(double[][] x, int[] y); static LDA fit(double[][] x, int[] y, Properties prop); static LDA fit(double[][] x, int[] y, double[] priori, double tol); double[] priori(); @Override int predict(double[] x); @Override int predict(double[] x, double[] posteriori);  }