public class SVMModel extends GeneralizedLinearModel implements ClassificationModel, scala.Serializable, Saveable
| Constructor and Description |
|---|
SVMModel(Vector weights,
double intercept) |
| Modifier and Type | Method and Description |
|---|---|
SVMModel |
clearThreshold()
:: Experimental ::
Clears the threshold so that
predict will output raw prediction scores. |
scala.Option<Object> |
getThreshold()
:: Experimental ::
Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.
|
double |
intercept() |
static SVMModel |
load(SparkContext sc,
String path) |
void |
save(SparkContext sc,
String path)
Save this model to the given path.
|
SVMModel |
setThreshold(double threshold)
:: Experimental ::
Sets the threshold that separates positive predictions from negative predictions.
|
Vector |
weights() |
predict, predict, toStringpredict, predict, predictpublic SVMModel(Vector weights, double intercept)
public static SVMModel load(SparkContext sc, String path)
public Vector weights()
weights in class GeneralizedLinearModelpublic double intercept()
intercept in class GeneralizedLinearModelpublic SVMModel setThreshold(double threshold)
public scala.Option<Object> getThreshold()
public SVMModel clearThreshold()
predict will output raw prediction scores.public 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.