@Test public void testBreastCancer() { System.out.println("Breast Cancer"); MathEx.setSeed(19650218); int[] prediction = CrossValidation.classification(10, BreastCancer.formula, BreastCancer.data, (f, x) -> AdaBoost.fit(f, x, 200, 20, 4, 1)); int error = Error.of(BreastCancer.y, prediction); System.out.println("Error = " + error); assertEquals(19, error); }
public static AdaBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
AdaBoost implements SoftClassifier<Tuple>, DataFrameClassifier, TreeSHAP { public static AdaBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
AdaBoost implements SoftClassifier<Tuple>, DataFrameClassifier, TreeSHAP { public static AdaBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } AdaBoost(Formula formula, int k, DecisionTree[] trees, double[] alpha, double[] error, double[] importance);  AdaBoost(Formula formula, int k, DecisionTree[] trees, double[] alpha, double[] error, double[] importance, IntSet labels); }
AdaBoost implements SoftClassifier<Tuple>, DataFrameClassifier, TreeSHAP { public static AdaBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } AdaBoost(Formula formula, int k, DecisionTree[] trees, double[] alpha, double[] error, double[] importance);  AdaBoost(Formula formula, int k, DecisionTree[] trees, double[] alpha, double[] error, double[] importance, IntSet labels); static AdaBoost fit(Formula formula, DataFrame data); static AdaBoost fit(Formula formula, DataFrame data, Properties prop); static AdaBoost fit(Formula formula, DataFrame data, int ntrees, int maxDepth, int maxNodes, int nodeSize); @Override Formula formula(); @Override StructType schema(); double[] importance(); int size(); DecisionTree[] trees(); void trim(int ntrees); @Override int predict(Tuple x); @Override int predict(Tuple x, double[] posteriori); int[][] test(DataFrame data); }
AdaBoost implements SoftClassifier<Tuple>, DataFrameClassifier, TreeSHAP { public static AdaBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } AdaBoost(Formula formula, int k, DecisionTree[] trees, double[] alpha, double[] error, double[] importance);  AdaBoost(Formula formula, int k, DecisionTree[] trees, double[] alpha, double[] error, double[] importance, IntSet labels); static AdaBoost fit(Formula formula, DataFrame data); static AdaBoost fit(Formula formula, DataFrame data, Properties prop); static AdaBoost fit(Formula formula, DataFrame data, int ntrees, int maxDepth, int maxNodes, int nodeSize); @Override Formula formula(); @Override StructType schema(); double[] importance(); int size(); DecisionTree[] trees(); void trim(int ntrees); @Override int predict(Tuple x); @Override int predict(Tuple x, double[] posteriori); int[][] test(DataFrame data);  }