test_class.declarator: PRECISION = 1e-6
test_class.modifier: private static final
test_class.original_string: private static final double PRECISION = 1e-6;
test_class.type: double
test_class.var_name: PRECISION
test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/regressions/linear/LinearRegressionModelTest.java
test_class.identifier: LinearRegressionModelTest
test_case.body: @Test
      public void testPredict() {
          Vector weights = new DenseVector(new double[]{2.0, 3.0});
          LinearRegressionModel mdl = new LinearRegressionModel(weights, 1.0);
  
          assertTrue(!mdl.toString().isEmpty());
          assertTrue(!mdl.toString(true).isEmpty());
          assertTrue(!mdl.toString(false).isEmpty());
  
          Vector observation = new DenseVector(new double[]{1.0, 1.0});
          TestUtils.assertEquals(1.0 + 2.0 * 1.0 + 3.0 * 1.0, mdl.predict(observation), PRECISION);
  
          observation = new DenseVector(new double[]{2.0, 1.0});
          TestUtils.assertEquals(1.0 + 2.0 * 2.0 + 3.0 * 1.0, mdl.predict(observation), PRECISION);
  
          observation = new DenseVector(new double[]{1.0, 2.0});
          TestUtils.assertEquals(1.0 + 2.0 * 1.0 + 3.0 * 2.0, mdl.predict(observation), PRECISION);
  
          observation = new DenseVector(new double[]{-2.0, 1.0});
          TestUtils.assertEquals(1.0 - 2.0 * 2.0 + 3.0 * 1.0, mdl.predict(observation), PRECISION);
  
          observation = new DenseVector(new double[]{1.0, -2.0});
          TestUtils.assertEquals(1.0 + 2.0 * 1.0 - 3.0 * 2.0, mdl.predict(observation), PRECISION);
      }
test_case.class_method_signature: LinearRegressionModelTest.testPredict()
test_case.full_signature: @Test public void testPredict()
test_case.identifier: testPredict
test_case.invocations: assertTrue isEmpty toString assertTrue isEmpty toString assertTrue isEmpty toString assertEquals predict assertEquals predict assertEquals predict assertEquals predict assertEquals predict
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPredict()
focal_class.declarator: serialVersionUID = -105984600091550226L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -105984600091550226L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: weights
focal_class.modifier: private final
focal_class.original_string: private final Vector weights;
focal_class.type: Vector
focal_class.var_name: weights
focal_class.declarator: intercept
focal_class.modifier: private final
focal_class.original_string: private final double intercept;
focal_class.type: double
focal_class.var_name: intercept
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/regressions/linear/LinearRegressionModel.java
focal_class.identifier: LinearRegressionModel
focal_class.interfaces: implements IgniteModel<Vector, Double>, Exportable<LinearRegressionModel>, Serializable
focal_class.class_method_signature: LinearRegressionModel.LinearRegressionModel(Vector weights, double intercept)
focal_class.full_signature: public  LinearRegressionModel(Vector weights, double intercept)
focal_class.identifier: LinearRegressionModel
focal_class.modifiers: public
focal_class.parameters: (Vector weights, double intercept)
focal_class.signature:  LinearRegressionModel(Vector weights, double intercept)
focal_class.class_method_signature: LinearRegressionModel.getWeights()
focal_class.full_signature: public Vector getWeights()
focal_class.identifier: getWeights
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Vector
focal_class.signature: Vector getWeights()
focal_class.class_method_signature: LinearRegressionModel.getIntercept()
focal_class.full_signature: public double getIntercept()
focal_class.identifier: getIntercept
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getIntercept()
focal_class.class_method_signature: LinearRegressionModel.predict(Vector input)
focal_class.full_signature: @Override public Double predict(Vector input)
focal_class.identifier: predict
focal_class.modifiers: @Override public
focal_class.parameters: (Vector input)
focal_class.return: Double
focal_class.signature: Double predict(Vector input)
focal_class.class_method_signature: LinearRegressionModel.saveModel(Exporter<LinearRegressionModel, P> exporter, P path)
focal_class.full_signature: @Override public void saveModel(Exporter<LinearRegressionModel, P> exporter, P path)
focal_class.identifier: saveModel
focal_class.modifiers: @Override public
focal_class.parameters: (Exporter<LinearRegressionModel, P> exporter, P path)
focal_class.return: void
focal_class.signature: void saveModel(Exporter<LinearRegressionModel, P> exporter, P path)
focal_class.class_method_signature: LinearRegressionModel.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: LinearRegressionModel.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: LinearRegressionModel.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: LinearRegressionModel.toString(boolean pretty)
focal_class.full_signature: @Override public String toString(boolean pretty)
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: (boolean pretty)
focal_class.return: String
focal_class.signature: String toString(boolean pretty)
focal_method.body: @Override public Double predict(Vector input) {
          return input.dot(weights) + intercept;
      }
focal_method.class_method_signature: LinearRegressionModel.predict(Vector input)
focal_method.full_signature: @Override public Double predict(Vector input)
focal_method.identifier: predict
focal_method.invocations: dot
focal_method.modifiers: @Override public
focal_method.parameters: (Vector input)
focal_method.return: Double
focal_method.signature: Double predict(Vector input)