public class LassoModel extends GeneralizedLinearModel implements RegressionModel, scala.Serializable, Saveable, PMMLExportable
param: weights Weights computed for every feature. param: intercept Intercept computed for this model.
| Constructor and Description |
|---|
LassoModel(Vector weights,
double intercept) |
| Modifier and Type | Method and Description |
|---|---|
double |
intercept() |
static LassoModel |
load(SparkContext sc,
String path) |
static JavaRDD<Double> |
predict(JavaRDD<Vector> testData) |
static RDD<Object> |
predict(RDD<Vector> testData) |
static double |
predict(Vector testData) |
void |
save(SparkContext sc,
String path)
Save this model to the given path.
|
static String |
toPMML() |
static void |
toPMML(java.io.OutputStream outputStream) |
static void |
toPMML(SparkContext sc,
String path) |
static void |
toPMML(String localPath) |
static String |
toString() |
Vector |
weights() |
predict, predict, toStringpredict, predict, predictpublic LassoModel(Vector weights, double intercept)
public static LassoModel load(SparkContext sc, String path)
public static double predict(Vector testData)
public static String toString()
public static void toPMML(String localPath)
public static void toPMML(SparkContext sc, String path)
public static void toPMML(java.io.OutputStream outputStream)
public static String toPMML()
public Vector weights()
weights in class GeneralizedLinearModelpublic double intercept()
intercept in class GeneralizedLinearModelpublic void save(SparkContext sc, String path)
SaveableThis saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using Loader.load.