Class: SVMModel

eclairjs/mllib/classification. SVMModel

new SVMModel(weights, intercept, weights, intercept)

Model for Support Vector Machines (SVMs).
Parameters:
Name Type Description
weights Weights computed for every feature.
intercept Intercept computed for this model.
weights module:eclairjs/mllib/linalg.Vector
intercept float
Source:

Methods

(static) load(sc, path) → {module:eclairjs/mllib/classification.SVMModel}

Parameters:
Name Type Description
sc module:eclairjs.SparkContext
path string
Source:
Returns:
Type
module:eclairjs/mllib/classification.SVMModel

clearThreshold() → {module:eclairjs/mllib/classification.SVMModel}

Clears the threshold so that `predict` will output raw prediction scores.
Source:
Returns:
Type
module:eclairjs/mllib/classification.SVMModel

getThreshold() → {number}

Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.
Source:
Returns:
Type
number

intercept() → {float}

Source:
Returns:
Type
float

save(sc, path)

Parameters:
Name Type Description
sc module:eclairjs.SparkContext
path string
Source:

setThreshold(threshold)

Sets the threshold that separates positive predictions from negative predictions. An example with prediction score greater than or equal to this threshold is identified as an positive, and negative otherwise. The default value is 0.0.
Parameters:
Name Type Description
threshold float
Source:
Returns:

toString() → {string}

Source:
Returns:
Type
string

weights() → {module:eclairjs/mllib/linalg.Vector}

Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector