|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectorg.apache.spark.mllib.regression.GeneralizedLinearModel
org.apache.spark.mllib.classification.SVMModel
public class SVMModel
Model for Support Vector Machines (SVMs).
param: weights Weights computed for every feature. param: intercept Intercept computed for this model.
| Constructor Summary | |
|---|---|
SVMModel(Vector weights,
double intercept)
|
|
| Method Summary | |
|---|---|
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. |
String |
toString()
Print a summary of the model. |
Vector |
weights()
|
| Methods inherited from class org.apache.spark.mllib.regression.GeneralizedLinearModel |
|---|
predict, predict |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.spark.mllib.classification.ClassificationModel |
|---|
predict, predict, predict |
| Methods inherited from interface org.apache.spark.mllib.pmml.PMMLExportable |
|---|
toPMML, toPMML, toPMML, toPMML, toPMML |
| Constructor Detail |
|---|
public SVMModel(Vector weights,
double intercept)
| Method Detail |
|---|
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)
threshold - (undocumented)
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.
save in interface Saveablesc - Spark context used to save model data.path - Path specifying the directory in which to save this model.
If the directory already exists, this method throws an exception.public String toString()
GeneralizedLinearModel
toString in class GeneralizedLinearModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||