@Test public void testBreastCancer() { System.out.println("Breast Cancer"); MathEx.setSeed(19650218); int[] prediction = CrossValidation.classification(10, BreastCancer.x, BreastCancer.y, (x, y) -> LogisticRegression.fit(x, y)); int error = Error.of(BreastCancer.y, prediction); System.out.println("Error = " + error); assertEquals(26, error); }
public static LogisticRegression fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
LogisticRegression implements SoftClassifier<double[]>, OnlineClassifier<double[]> { public static LogisticRegression fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
LogisticRegression implements SoftClassifier<double[]>, OnlineClassifier<double[]> { public static LogisticRegression fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } LogisticRegression(int p, double L, double lambda, IntSet labels); }
LogisticRegression implements SoftClassifier<double[]>, OnlineClassifier<double[]> { public static LogisticRegression fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } LogisticRegression(int p, double L, double lambda, IntSet labels); static Binomial binomial(Formula formula, DataFrame data); static Binomial binomial(Formula formula, DataFrame data, Properties prop); static Binomial binomial(double[][] x, int[] y); static Binomial binomial(double[][] x, int[] y, Properties prop); static Binomial binomial(double[][] x, int[] y, double lambda, double tol, int maxIter); static Multinomial multinomial(Formula formula, DataFrame data); static Multinomial multinomial(Formula formula, DataFrame data, Properties prop); static Multinomial multinomial(double[][] x, int[] y); static Multinomial multinomial(double[][] x, int[] y, Properties prop); static Multinomial multinomial(double[][] x, int[] y, double lambda, double tol, int maxIter); static LogisticRegression fit(Formula formula, DataFrame data); static LogisticRegression fit(Formula formula, DataFrame data, Properties prop); static LogisticRegression fit(double[][] x, int[] y); static LogisticRegression fit(double[][] x, int[] y, Properties prop); static LogisticRegression fit(double[][] x, int[] y, double lambda, double tol, int maxIter); void setLearningRate(double rate); double getLearningRate(); double loglikelihood(); double AIC(); }
LogisticRegression implements SoftClassifier<double[]>, OnlineClassifier<double[]> { public static LogisticRegression fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } LogisticRegression(int p, double L, double lambda, IntSet labels); static Binomial binomial(Formula formula, DataFrame data); static Binomial binomial(Formula formula, DataFrame data, Properties prop); static Binomial binomial(double[][] x, int[] y); static Binomial binomial(double[][] x, int[] y, Properties prop); static Binomial binomial(double[][] x, int[] y, double lambda, double tol, int maxIter); static Multinomial multinomial(Formula formula, DataFrame data); static Multinomial multinomial(Formula formula, DataFrame data, Properties prop); static Multinomial multinomial(double[][] x, int[] y); static Multinomial multinomial(double[][] x, int[] y, Properties prop); static Multinomial multinomial(double[][] x, int[] y, double lambda, double tol, int maxIter); static LogisticRegression fit(Formula formula, DataFrame data); static LogisticRegression fit(Formula formula, DataFrame data, Properties prop); static LogisticRegression fit(double[][] x, int[] y); static LogisticRegression fit(double[][] x, int[] y, Properties prop); static LogisticRegression fit(double[][] x, int[] y, double lambda, double tol, int maxIter); void setLearningRate(double rate); double getLearningRate(); double loglikelihood(); double AIC();  }