test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/regressions/linear/LinearRegressionSGDTrainerTest.java
test_class.identifier: LinearRegressionSGDTrainerTest
test_class.superclass: extends TrainerTest
test_case.body: @Test
      public void testUpdate() {
          Map<Integer, double[]> data = new HashMap<>();
          data.put(0, new double[]{-1.0915526, 1.81983527, -0.91409478, 0.70890712, -24.55724107});
          data.put(1, new double[]{-0.61072904, 0.37545517, 0.21705352, 0.09516495, -26.57226867});
          data.put(2, new double[]{0.05485406, 0.88219898, -0.80584547, 0.94668307, 61.80919728});
          data.put(3, new double[]{-0.24835094, -0.34000053, -1.69984651, -1.45902635, -161.65525991});
          data.put(4, new double[]{0.63675392, 0.31675535, 0.38837437, -1.1221971, -14.46432611});
          data.put(5, new double[]{0.14194017, 2.18158997, -0.28397346, -0.62090588, -3.2122197});
          data.put(6, new double[]{-0.53487507, 1.4454797, 0.21570443, -0.54161422, -46.5469012});
          data.put(7, new double[]{-1.58812173, -0.73216803, -2.15670676, -1.03195988, -247.23559889});
          data.put(8, new double[]{0.20702671, 0.92864654, 0.32721202, -0.09047503, 31.61484949});
          data.put(9, new double[]{-0.37890345, -0.04846179, -0.84122753, -1.14667474, -124.92598583});
  
          LinearRegressionSGDTrainer<?> trainer = new LinearRegressionSGDTrainer<>(new UpdatesStrategy<>(
              new RPropUpdateCalculator(),
              RPropParameterUpdate.SUM_LOCAL,
              RPropParameterUpdate.AVG
          ), 1800, 10, 10, 123L);
  
          LinearRegressionModel originalMdl = trainer.withSeed(0).fit(
              data, parts,
              new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.LAST)
          );
  
          LinearRegressionModel updatedOnSameDS = trainer.withSeed(0).update(
              originalMdl,
              data,
              parts,
              new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.LAST)
          );
  
          LinearRegressionModel updatedOnEmptyDS = trainer.withSeed(0).update(
              originalMdl,
              new HashMap<>(),
              parts,
              new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.LAST)
          );
  
          assertArrayEquals(
              originalMdl.getWeights().getStorage().data(),
              updatedOnSameDS.getWeights().getStorage().data(),
              1.0
          );
  
          assertEquals(originalMdl.getIntercept(), updatedOnSameDS.getIntercept(), 1.0);
  
          assertArrayEquals(
              originalMdl.getWeights().getStorage().data(),
              updatedOnEmptyDS.getWeights().getStorage().data(),
              1e-1
          );
  
          assertEquals(originalMdl.getIntercept(), updatedOnEmptyDS.getIntercept(), 1e-1);
      }
test_case.class_method_signature: LinearRegressionSGDTrainerTest.testUpdate()
test_case.full_signature: @Test public void testUpdate()
test_case.identifier: testUpdate
test_case.invocations: put put put put put put put put put put fit withSeed labeled update withSeed labeled update withSeed labeled assertArrayEquals data getStorage getWeights data getStorage getWeights assertEquals getIntercept getIntercept assertArrayEquals data getStorage getWeights data getStorage getWeights assertEquals getIntercept getIntercept
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdate()
focal_class.declarator: updatesStgy
focal_class.modifier: private final
focal_class.original_string: private final UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy;
focal_class.type: UpdatesStrategy<? super MultilayerPerceptron, P>
focal_class.var_name: updatesStgy
focal_class.declarator: maxIterations = 1000
focal_class.modifier: private
focal_class.original_string: private int maxIterations = 1000;
focal_class.type: int
focal_class.var_name: maxIterations
focal_class.declarator: batchSize = 10
focal_class.modifier: private
focal_class.original_string: private int batchSize = 10;
focal_class.type: int
focal_class.var_name: batchSize
focal_class.declarator: locIterations = 100
focal_class.modifier: private
focal_class.original_string: private int locIterations = 100;
focal_class.type: int
focal_class.var_name: locIterations
focal_class.declarator: seed = 1234L
focal_class.modifier: private
focal_class.original_string: private long seed = 1234L;
focal_class.type: long
focal_class.var_name: seed
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/regressions/linear/LinearRegressionSGDTrainer.java
focal_class.identifier: LinearRegressionSGDTrainer
focal_class.class_method_signature: LinearRegressionSGDTrainer.LinearRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy, int maxIterations,
          int batchSize, int locIterations, long seed)
focal_class.full_signature: public  LinearRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy, int maxIterations,
          int batchSize, int locIterations, long seed)
focal_class.identifier: LinearRegressionSGDTrainer
focal_class.modifiers: public
focal_class.parameters: (UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy, int maxIterations,
          int batchSize, int locIterations, long seed)
focal_class.signature:  LinearRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy, int maxIterations,
          int batchSize, int locIterations, long seed)
focal_class.class_method_signature: LinearRegressionSGDTrainer.LinearRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy)
focal_class.full_signature: public  LinearRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy)
focal_class.identifier: LinearRegressionSGDTrainer
focal_class.modifiers: public
focal_class.parameters: (UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy)
focal_class.signature:  LinearRegressionSGDTrainer(UpdatesStrategy<? super MultilayerPerceptron, P> updatesStgy)
focal_class.class_method_signature: LinearRegressionSGDTrainer.fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                        Preprocessor<K, V> extractor)
focal_class.full_signature: @Override public LinearRegressionModel fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                        Preprocessor<K, V> extractor)
focal_class.identifier: fitWithInitializedDeployingContext
focal_class.modifiers: @Override public
focal_class.parameters: (DatasetBuilder<K, V> datasetBuilder,
                                                        Preprocessor<K, V> extractor)
focal_class.return: LinearRegressionModel
focal_class.signature: LinearRegressionModel fitWithInitializedDeployingContext(DatasetBuilder<K, V> datasetBuilder,
                                                        Preprocessor<K, V> extractor)
focal_class.class_method_signature: LinearRegressionSGDTrainer.updateModel(LinearRegressionModel mdl,
                                                                   DatasetBuilder<K, V> datasetBuilder,
                                                                   Preprocessor<K, V> extractor)
focal_class.full_signature: @Override protected LinearRegressionModel updateModel(LinearRegressionModel mdl,
                                                                   DatasetBuilder<K, V> datasetBuilder,
                                                                   Preprocessor<K, V> extractor)
focal_class.identifier: updateModel
focal_class.modifiers: @Override protected
focal_class.parameters: (LinearRegressionModel mdl,
                                                                   DatasetBuilder<K, V> datasetBuilder,
                                                                   Preprocessor<K, V> extractor)
focal_class.return: LinearRegressionModel
focal_class.signature: LinearRegressionModel updateModel(LinearRegressionModel mdl,
                                                                   DatasetBuilder<K, V> datasetBuilder,
                                                                   Preprocessor<K, V> extractor)
focal_class.class_method_signature: LinearRegressionSGDTrainer.restoreMLPState(LinearRegressionModel mdl)
focal_class.full_signature: @NotNull private MultilayerPerceptron restoreMLPState(LinearRegressionModel mdl)
focal_class.identifier: restoreMLPState
focal_class.modifiers: @NotNull private
focal_class.parameters: (LinearRegressionModel mdl)
focal_class.return: MultilayerPerceptron
focal_class.signature: MultilayerPerceptron restoreMLPState(LinearRegressionModel mdl)
focal_class.class_method_signature: LinearRegressionSGDTrainer.isUpdateable(LinearRegressionModel mdl)
focal_class.full_signature: @Override public boolean isUpdateable(LinearRegressionModel mdl)
focal_class.identifier: isUpdateable
focal_class.modifiers: @Override public
focal_class.parameters: (LinearRegressionModel mdl)
focal_class.return: boolean
focal_class.signature: boolean isUpdateable(LinearRegressionModel mdl)
focal_class.class_method_signature: LinearRegressionSGDTrainer.withMaxIterations(int maxIterations)
focal_class.full_signature: public LinearRegressionSGDTrainer<P> withMaxIterations(int maxIterations)
focal_class.identifier: withMaxIterations
focal_class.modifiers: public
focal_class.parameters: (int maxIterations)
focal_class.return: LinearRegressionSGDTrainer<P>
focal_class.signature: LinearRegressionSGDTrainer<P> withMaxIterations(int maxIterations)
focal_class.class_method_signature: LinearRegressionSGDTrainer.withBatchSize(int batchSize)
focal_class.full_signature: public LinearRegressionSGDTrainer<P> withBatchSize(int batchSize)
focal_class.identifier: withBatchSize
focal_class.modifiers: public
focal_class.parameters: (int batchSize)
focal_class.return: LinearRegressionSGDTrainer<P>
focal_class.signature: LinearRegressionSGDTrainer<P> withBatchSize(int batchSize)
focal_class.class_method_signature: LinearRegressionSGDTrainer.withLocIterations(int amountOfLocIterations)
focal_class.full_signature: public LinearRegressionSGDTrainer<P> withLocIterations(int amountOfLocIterations)
focal_class.identifier: withLocIterations
focal_class.modifiers: public
focal_class.parameters: (int amountOfLocIterations)
focal_class.return: LinearRegressionSGDTrainer<P>
focal_class.signature: LinearRegressionSGDTrainer<P> withLocIterations(int amountOfLocIterations)
focal_class.class_method_signature: LinearRegressionSGDTrainer.withSeed(long seed)
focal_class.full_signature: public LinearRegressionSGDTrainer<P> withSeed(long seed)
focal_class.identifier: withSeed
focal_class.modifiers: public
focal_class.parameters: (long seed)
focal_class.return: LinearRegressionSGDTrainer<P>
focal_class.signature: LinearRegressionSGDTrainer<P> withSeed(long seed)
focal_class.class_method_signature: LinearRegressionSGDTrainer.getUpdatesStgy()
focal_class.full_signature: public UpdatesStrategy<? super MultilayerPerceptron, P> getUpdatesStgy()
focal_class.identifier: getUpdatesStgy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: UpdatesStrategy<? super MultilayerPerceptron, P>
focal_class.signature: UpdatesStrategy<? super MultilayerPerceptron, P> getUpdatesStgy()
focal_class.class_method_signature: LinearRegressionSGDTrainer.getMaxIterations()
focal_class.full_signature: public int getMaxIterations()
focal_class.identifier: getMaxIterations
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxIterations()
focal_class.class_method_signature: LinearRegressionSGDTrainer.getBatchSize()
focal_class.full_signature: public int getBatchSize()
focal_class.identifier: getBatchSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getBatchSize()
focal_class.class_method_signature: LinearRegressionSGDTrainer.getLocIterations()
focal_class.full_signature: public int getLocIterations()
focal_class.identifier: getLocIterations
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getLocIterations()
focal_class.class_method_signature: LinearRegressionSGDTrainer.getSeed()
focal_class.full_signature: public long getSeed()
focal_class.identifier: getSeed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getSeed()
focal_class.superclass: extends SingleLabelDatasetTrainer<LinearRegressionModel>
focal_method.body: public LinearRegressionSGDTrainer<P> withSeed(long seed) {
          this.seed = seed;
          return this;
      }
focal_method.class_method_signature: LinearRegressionSGDTrainer.withSeed(long seed)
focal_method.full_signature: public LinearRegressionSGDTrainer<P> withSeed(long seed)
focal_method.identifier: withSeed
focal_method.modifiers: public
focal_method.parameters: (long seed)
focal_method.return: LinearRegressionSGDTrainer<P>
focal_method.signature: LinearRegressionSGDTrainer<P> withSeed(long seed)