@Test(expected = Test.None.class) public void testUSPS() throws Exception { System.out.println("USPS"); LDA model = LDA.fit(USPS.x, USPS.y); int[] prediction = Validation.test(model, USPS.testx); int error = Error.of(USPS.testy, prediction); System.out.println("Error = " + error); assertEquals(256, error); java.nio.file.Path temp = smile.data.Serialize.write(model); smile.data.Serialize.read(temp); }
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);  }