@Test(expected = Test.None.class) public void testUSPS() throws Exception { System.out.println("USPS"); FLD model = FLD.fit(USPS.x, USPS.y); int error = Error.of(USPS.testy, Validation.test(model, USPS.testx)); System.out.println("Error = " + error); assertEquals(262, error); java.nio.file.Path temp = smile.data.Serialize.write(model); model = (FLD) smile.data.Serialize.read(temp); Validation.test(model, USPS.testx); error = Error.of(USPS.testy, Validation.test(model, USPS.testx)); System.out.println("Error = " + error); assertEquals(262, error); }
public static FLD fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
FLD implements Classifier<double[]>, Projection<double[]> { public static FLD fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
FLD implements Classifier<double[]>, Projection<double[]> { public static FLD fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } FLD(double[] mean, double[][] mu, Matrix scaling);  FLD(double[] mean, double[][] mu, Matrix scaling, IntSet labels); }
FLD implements Classifier<double[]>, Projection<double[]> { public static FLD fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } FLD(double[] mean, double[][] mu, Matrix scaling);  FLD(double[] mean, double[][] mu, Matrix scaling, IntSet labels); static FLD fit(Formula formula, DataFrame data); static FLD fit(Formula formula, DataFrame data, Properties prop); static FLD fit(double[][] x, int[] y); static FLD fit(double[][] x, int[] y, int L, double tol); @Override int predict(double[] x); @Override double[] project(double[] x); @Override double[][] project(double[][] x); Matrix getProjection(); }
FLD implements Classifier<double[]>, Projection<double[]> { public static FLD fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } FLD(double[] mean, double[][] mu, Matrix scaling);  FLD(double[] mean, double[][] mu, Matrix scaling, IntSet labels); static FLD fit(Formula formula, DataFrame data); static FLD fit(Formula formula, DataFrame data, Properties prop); static FLD fit(double[][] x, int[] y); static FLD fit(double[][] x, int[] y, int L, double tol); @Override int predict(double[] x); @Override double[] project(double[] x); @Override double[][] project(double[][] x); Matrix getProjection();  }