@Test public void testBreastCancer() { System.out.println("Breast Cancer"); MathEx.setSeed(19650218); int[] prediction = CrossValidation.classification(10, BreastCancer.formula, BreastCancer.data, (f, x) -> GradientTreeBoost.fit(f, x, 100, 20, 6, 5, 0.05, 0.7)); int error = Error.of(BreastCancer.y, prediction); System.out.println("Error = " + error); assertEquals(21, error); }
public static GradientTreeBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
GradientTreeBoost implements SoftClassifier<Tuple>, DataFrameClassifier, SHAP<Tuple> { public static GradientTreeBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
GradientTreeBoost implements SoftClassifier<Tuple>, DataFrameClassifier, SHAP<Tuple> { public static GradientTreeBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } GradientTreeBoost(Formula formula, RegressionTree[] trees, double b, double shrinkage, double[] importance);  GradientTreeBoost(Formula formula, RegressionTree[] trees, double b, double shrinkage, double[] importance, IntSet labels);  GradientTreeBoost(Formula formula, RegressionTree[][] forest, double shrinkage, double[] importance);  GradientTreeBoost(Formula formula, RegressionTree[][] forest, double shrinkage, double[] importance, IntSet labels); }
GradientTreeBoost implements SoftClassifier<Tuple>, DataFrameClassifier, SHAP<Tuple> { public static GradientTreeBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } GradientTreeBoost(Formula formula, RegressionTree[] trees, double b, double shrinkage, double[] importance);  GradientTreeBoost(Formula formula, RegressionTree[] trees, double b, double shrinkage, double[] importance, IntSet labels);  GradientTreeBoost(Formula formula, RegressionTree[][] forest, double shrinkage, double[] importance);  GradientTreeBoost(Formula formula, RegressionTree[][] forest, double shrinkage, double[] importance, IntSet labels); static GradientTreeBoost fit(Formula formula, DataFrame data); static GradientTreeBoost fit(Formula formula, DataFrame data, Properties prop); static GradientTreeBoost fit(Formula formula, DataFrame data, int ntrees, int maxDepth,
                                        int maxNodes, int nodeSize, double shrinkage, double subsample); @Override Formula formula(); @Override StructType schema(); double[] importance(); int size(); RegressionTree[] trees(); void trim(int ntrees); @Override int predict(Tuple x); @Override int predict(Tuple x, double[] posteriori); int[][] test(DataFrame data); double[] shap(DataFrame data); @Override double[] shap(Tuple x); }
GradientTreeBoost implements SoftClassifier<Tuple>, DataFrameClassifier, SHAP<Tuple> { public static GradientTreeBoost fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } GradientTreeBoost(Formula formula, RegressionTree[] trees, double b, double shrinkage, double[] importance);  GradientTreeBoost(Formula formula, RegressionTree[] trees, double b, double shrinkage, double[] importance, IntSet labels);  GradientTreeBoost(Formula formula, RegressionTree[][] forest, double shrinkage, double[] importance);  GradientTreeBoost(Formula formula, RegressionTree[][] forest, double shrinkage, double[] importance, IntSet labels); static GradientTreeBoost fit(Formula formula, DataFrame data); static GradientTreeBoost fit(Formula formula, DataFrame data, Properties prop); static GradientTreeBoost fit(Formula formula, DataFrame data, int ntrees, int maxDepth,
                                        int maxNodes, int nodeSize, double shrinkage, double subsample); @Override Formula formula(); @Override StructType schema(); double[] importance(); int size(); RegressionTree[] trees(); void trim(int ntrees); @Override int predict(Tuple x); @Override int predict(Tuple x, double[] posteriori); int[][] test(DataFrame data); double[] shap(DataFrame data); @Override double[] shap(Tuple x);  }