public class RidgeRegressionModel extends GeneralizedLinearModel implements RegressionModel, scala.Serializable, Saveable
Constructor and Description |
---|
RidgeRegressionModel(Vector weights,
double intercept) |
Modifier and Type | Method and Description |
---|---|
double |
intercept() |
static RidgeRegressionModel |
load(SparkContext sc,
String path) |
void |
save(SparkContext sc,
String path)
Save this model to the given path.
|
Vector |
weights() |
predict, predict, toString
predict, predict, predict
public RidgeRegressionModel(Vector weights, double intercept)
public static RidgeRegressionModel load(SparkContext sc, String path)
public Vector weights()
weights
in class GeneralizedLinearModel
public double intercept()
intercept
in class GeneralizedLinearModel
public void save(SparkContext sc, String path)
Saveable
This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using Loader.load
.