Class LinearRegressionModel
Object
org.apache.spark.mllib.regression.GeneralizedLinearModel
org.apache.spark.mllib.regression.LinearRegressionModel
- All Implemented Interfaces:
Serializable
,PMMLExportable
,RegressionModel
,Saveable
,scala.Serializable
public class LinearRegressionModel
extends GeneralizedLinearModel
implements RegressionModel, scala.Serializable, Saveable, PMMLExportable
Regression model trained using LinearRegression.
param: weights Weights computed for every feature. param: intercept Intercept computed for this model.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
static LinearRegressionModel
load
(SparkContext sc, String path) void
save
(SparkContext sc, String path) Save this model to the given path.weights()
Methods inherited from class org.apache.spark.mllib.regression.GeneralizedLinearModel
predict, predict, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.spark.mllib.pmml.PMMLExportable
toPMML, toPMML, toPMML, toPMML, toPMML
Methods inherited from interface org.apache.spark.mllib.regression.RegressionModel
predict, predict, predict
-
Constructor Details
-
LinearRegressionModel
-
-
Method Details
-
load
-
weights
- Overrides:
weights
in classGeneralizedLinearModel
-
intercept
public double intercept()- Overrides:
intercept
in classGeneralizedLinearModel
-
save
Description copied from interface:Saveable
Save this model to the given path.This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using
Loader.load
.
-