use of org.apache.ignite.ml.regressions.linear.LinearRegressionModel in project ignite by apache.
the class LocalModelsTest method importExportLinearRegressionModelTest.
/**
*/
@Test
public void importExportLinearRegressionModelTest() throws IOException {
executeModelTest(mdlFilePath -> {
LinearRegressionModel model = new LinearRegressionModel(new DenseLocalOnHeapVector(new double[] { 1, 2 }), 3);
Exporter<LinearRegressionModel, String> exporter = new FileExporter<>();
model.saveModel(exporter, mdlFilePath);
LinearRegressionModel load = exporter.load(mdlFilePath);
Assert.assertNotNull(load);
Assert.assertEquals("", model, load);
return null;
});
}
Aggregations