test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/composition/boosting/GDBTrainerTest.java
test_class.identifier: GDBTrainerTest
test_class.superclass: extends TrainerTest
test_case.body: @Test
      public void testFitRegression() {
          int size = 100;
          double[] xs = new double[size];
          double[] ys = new double[size];
          double from = -5.0;
          double to = 5.0;
          double step = Math.abs(from - to) / size;
  
          Map<Integer, double[]> learningSample = new HashMap<>();
          for (int i = 0; i < size; i++) {
              xs[i] = from + step * i;
              ys[i] = 2 * xs[i];
              learningSample.put(i, new double[] {xs[i], ys[i]});
          }
  
          GDBTrainer trainer = new GDBRegressionOnTreesTrainer(1.0, 400, 3, 0.0)
              .withUsingIdx(true);
  
          IgniteModel<Vector, Double> mdl = trainer.fit(
              learningSample, 1,
              new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.LAST)
          );
  
          double mse = 0.0;
          for (int j = 0; j < size; j++) {
              double x = xs[j];
              double y = ys[j];
              double p = mdl.predict(VectorUtils.of(x));
              mse += Math.pow(y - p, 2);
          }
          mse /= size;
  
          assertEquals(0.0, mse, 0.0001);
  
          ModelsComposition composition = (ModelsComposition)mdl;
          assertTrue(!composition.toString().isEmpty());
          assertTrue(!composition.toString(true).isEmpty());
          assertTrue(!composition.toString(false).isEmpty());
  
          composition.getModels().forEach(m -> assertTrue(m instanceof DecisionTreeConditionalNode));
  
          assertEquals(400, composition.getModels().size());
          assertTrue(composition.getPredictionsAggregator() instanceof WeightedPredictionsAggregator);
  
          trainer = trainer.withCheckConvergenceStgyFactory(new MeanAbsValueConvergenceCheckerFactory(0.1));
          assertTrue(trainer.fit(learningSample, 1, new DoubleArrayVectorizer<Integer>().labeled(1)).getModels().size() < 2000);
      }
test_case.class_method_signature: GDBTrainerTest.testFitRegression()
test_case.full_signature: @Test public void testFitRegression()
test_case.identifier: testFitRegression
test_case.invocations: abs put withUsingIdx fit labeled predict of pow assertEquals assertTrue isEmpty toString assertTrue isEmpty toString assertTrue isEmpty toString forEach getModels assertTrue assertEquals size getModels assertTrue getPredictionsAggregator withCheckConvergenceStgyFactory assertTrue size getModels fit labeled
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFitRegression()
focal_class.declarator: gradientStep
focal_class.modifier: private final
focal_class.original_string: private final double gradientStep;
focal_class.type: double
focal_class.var_name: gradientStep
focal_class.declarator: cntOfIterations
focal_class.modifier: private final
focal_class.original_string: private final int cntOfIterations;
focal_class.type: int
focal_class.var_name: cntOfIterations
focal_class.declarator: loss
focal_class.modifier: protected final
focal_class.original_string: protected final Loss loss;
focal_class.type: Loss
focal_class.var_name: loss
focal_class.declarator: checkConvergenceStgyFactory = new MeanAbsValueConvergenceCheckerFactory(0.001)
focal_class.modifier: protected
focal_class.original_string: protected ConvergenceCheckerFactory checkConvergenceStgyFactory = new MeanAbsValueConvergenceCheckerFactory(0.001);
focal_class.type: ConvergenceCheckerFactory
focal_class.var_name: checkConvergenceStgyFactory
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/composition/boosting/GDBTrainer.java
focal_class.identifier: GDBTrainer
focal_class.class_method_signature: GDBTrainer.GDBTrainer(double gradStepSize, Integer cntOfIterations, Loss loss)
focal_class.full_signature: public  GDBTrainer(double gradStepSize, Integer cntOfIterations, Loss loss)
focal_class.identifier: GDBTrainer
focal_class.modifiers: public
focal_class.parameters: (double gradStepSize, Integer cntOfIterations, Loss loss)
focal_class.signature:  GDBTrainer(double gradStepSize, Integer cntOfIterations, Loss loss)
focal_class.class_method_signature: GDBTrainer.fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.full_signature: @Override public ModelsComposition fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.identifier: fitWithInitializedDeployingContext
focal_class.modifiers: @Override public
focal_class.parameters: (DatasetBuilder<K, V> datasetBuilder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.return: ModelsComposition
focal_class.signature: ModelsComposition fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.class_method_signature: GDBTrainer.updateModel(ModelsComposition mdl,
                                                               DatasetBuilder<K, V> datasetBuilder,
                                                               Preprocessor<K, V> preprocessor)
focal_class.full_signature: @Override protected ModelsComposition updateModel(ModelsComposition mdl,
                                                               DatasetBuilder<K, V> datasetBuilder,
                                                               Preprocessor<K, V> preprocessor)
focal_class.identifier: updateModel
focal_class.modifiers: @Override protected
focal_class.parameters: (ModelsComposition mdl,
                                                               DatasetBuilder<K, V> datasetBuilder,
                                                               Preprocessor<K, V> preprocessor)
focal_class.return: ModelsComposition
focal_class.signature: ModelsComposition updateModel(ModelsComposition mdl,
                                                               DatasetBuilder<K, V> datasetBuilder,
                                                               Preprocessor<K, V> preprocessor)
focal_class.class_method_signature: GDBTrainer.isUpdateable(ModelsComposition mdl)
focal_class.full_signature: @Override public boolean isUpdateable(ModelsComposition mdl)
focal_class.identifier: isUpdateable
focal_class.modifiers: @Override public
focal_class.parameters: (ModelsComposition mdl)
focal_class.return: boolean
focal_class.signature: boolean isUpdateable(ModelsComposition mdl)
focal_class.class_method_signature: GDBTrainer.withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
focal_class.full_signature: @Override public GDBTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
focal_class.identifier: withEnvironmentBuilder
focal_class.modifiers: @Override public
focal_class.parameters: (LearningEnvironmentBuilder envBuilder)
focal_class.return: GDBTrainer
focal_class.signature: GDBTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
focal_class.class_method_signature: GDBTrainer.learnLabels(DatasetBuilder<K, V> builder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.full_signature: protected abstract boolean learnLabels(DatasetBuilder<K, V> builder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.identifier: learnLabels
focal_class.modifiers: protected abstract
focal_class.parameters: (DatasetBuilder<K, V> builder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.return: boolean
focal_class.signature: boolean learnLabels(DatasetBuilder<K, V> builder,
                                                    Preprocessor<K, V> preprocessor)
focal_class.class_method_signature: GDBTrainer.buildBaseModelTrainer()
focal_class.full_signature: @NotNull protected abstract DatasetTrainer<? extends IgniteModel<Vector, Double>, Double> buildBaseModelTrainer()
focal_class.identifier: buildBaseModelTrainer
focal_class.modifiers: @NotNull protected abstract
focal_class.parameters: ()
focal_class.return: DatasetTrainer<? extends IgniteModel<Vector, Double>, Double>
focal_class.signature: DatasetTrainer<? extends IgniteModel<Vector, Double>, Double> buildBaseModelTrainer()
focal_class.class_method_signature: GDBTrainer.externalLabelToInternal(double lbl)
focal_class.full_signature: protected abstract double externalLabelToInternal(double lbl)
focal_class.identifier: externalLabelToInternal
focal_class.modifiers: protected abstract
focal_class.parameters: (double lbl)
focal_class.return: double
focal_class.signature: double externalLabelToInternal(double lbl)
focal_class.class_method_signature: GDBTrainer.internalLabelToExternal(double lbl)
focal_class.full_signature: protected abstract double internalLabelToExternal(double lbl)
focal_class.identifier: internalLabelToExternal
focal_class.modifiers: protected abstract
focal_class.parameters: (double lbl)
focal_class.return: double
focal_class.signature: double internalLabelToExternal(double lbl)
focal_class.class_method_signature: GDBTrainer.computeInitialValue(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> builder,
          Preprocessor<K, V> preprocessor)
focal_class.full_signature: protected IgniteBiTuple<Double, Long> computeInitialValue(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> builder,
          Preprocessor<K, V> preprocessor)
focal_class.identifier: computeInitialValue
focal_class.modifiers: protected
focal_class.parameters: (
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> builder,
          Preprocessor<K, V> preprocessor)
focal_class.return: IgniteBiTuple<Double, Long>
focal_class.signature: IgniteBiTuple<Double, Long> computeInitialValue(
          LearningEnvironmentBuilder envBuilder,
          DatasetBuilder<K, V> builder,
          Preprocessor<K, V> preprocessor)
focal_class.class_method_signature: GDBTrainer.withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory)
focal_class.full_signature: public GDBTrainer withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory)
focal_class.identifier: withCheckConvergenceStgyFactory
focal_class.modifiers: public
focal_class.parameters: (ConvergenceCheckerFactory factory)
focal_class.return: GDBTrainer
focal_class.signature: GDBTrainer withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory)
focal_class.class_method_signature: GDBTrainer.getLearningStrategy()
focal_class.full_signature: protected GDBLearningStrategy getLearningStrategy()
focal_class.identifier: getLearningStrategy
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: GDBLearningStrategy
focal_class.signature: GDBLearningStrategy getLearningStrategy()
focal_class.superclass: extends DatasetTrainer<ModelsComposition, Double>
focal_method.body: public GDBTrainer withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory) {
          this.checkConvergenceStgyFactory = factory;
          return this;
      }
focal_method.class_method_signature: GDBTrainer.withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory)
focal_method.full_signature: public GDBTrainer withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory)
focal_method.identifier: withCheckConvergenceStgyFactory
focal_method.modifiers: public
focal_method.parameters: (ConvergenceCheckerFactory factory)
focal_method.return: GDBTrainer
focal_method.signature: GDBTrainer withCheckConvergenceStgyFactory(ConvergenceCheckerFactory factory)