public final class LinearRegressionModel extends Object implements IgniteModel<Vector,Double>, Exportable<LinearRegressionModel>, JSONWritable
Modifier and Type | Class and Description |
---|---|
static class |
LinearRegressionModel.LinearRegressionModelJSONExportModel |
Constructor and Description |
---|
LinearRegressionModel(Vector weights,
double intercept) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static LinearRegressionModel |
fromJSON(Path path)
Loads LinearRegressionModel from JSON file.
|
int |
hashCode() |
double |
intercept() |
Double |
predict(Vector input)
Make a prediction for the specified input arguments.
|
<P> void |
saveModel(Exporter<LinearRegressionModel,P> exporter,
P path)
Save model by the given path.
|
void |
toJSON(Path path) |
String |
toString() |
String |
toString(boolean pretty) |
Vector |
weights() |
LinearRegressionModel |
withIntercept(double intercept)
Set up the intercept.
|
LinearRegressionModel |
withWeights(Vector weights)
Set up the weights.
|
public LinearRegressionModel(Vector weights, double intercept)
public Vector weights()
public double intercept()
public LinearRegressionModel withWeights(Vector weights)
weights
- The parameter value.public LinearRegressionModel withIntercept(double intercept)
intercept
- The parameter value.public <P> void saveModel(Exporter<LinearRegressionModel,P> exporter, P path)
saveModel
in interface Exportable<LinearRegressionModel>
exporter
- Exporter.path
- Path to saved model.public String toString(boolean pretty)
toString
in interface IgniteModel<Vector,Double>
pretty
- Use pretty mode.public static LinearRegressionModel fromJSON(Path path)
public void toJSON(Path path)
toJSON
in interface JSONWritable
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021