@Test(expected = Test.None.class) public void testIris() throws Exception { System.out.println("Iris"); int[] prediction = LOOCV.classification(Iris.x, Iris.y, (x, y) -> QDA.fit(x, y)); int error = Error.of(Iris.y, prediction); System.out.println("Error = " + error); assertEquals(4, error); QDA model = QDA.fit(Iris.x, Iris.y); java.nio.file.Path temp = smile.data.Serialize.write(model); smile.data.Serialize.read(temp); }
public static QDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
QDA implements SoftClassifier<double[]> { public static QDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
QDA implements SoftClassifier<double[]> { public static QDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } QDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling);  QDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling, IntSet labels); }
QDA implements SoftClassifier<double[]> { public static QDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } QDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling);  QDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling, IntSet labels); static QDA fit(Formula formula, DataFrame data); static QDA fit(Formula formula, DataFrame data, Properties prop); static QDA fit(double[][] x, int[] y); static QDA fit(double[][] x, int[] y, Properties prop); static QDA fit(double[][] x, int[] y, double[] priori, double tol); double[] priori(); @Override int predict(double[] x); @Override int predict(double[] x, double[] posteriori); }
QDA implements SoftClassifier<double[]> { public static QDA fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } QDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling);  QDA(double[] priori, double[][] mu, double[][] eigen, Matrix[] scaling, IntSet labels); static QDA fit(Formula formula, DataFrame data); static QDA fit(Formula formula, DataFrame data, Properties prop); static QDA fit(double[][] x, int[] y); static QDA fit(double[][] x, int[] y, Properties prop); static QDA fit(double[][] x, int[] y, double[] priori, double tol); double[] priori(); @Override int predict(double[] x); @Override int predict(double[] x, double[] posteriori);  }