Class: OneVsRestModel

eclairjs/ml/classification.OneVsRestModel

Model produced by OneVsRest. This stores the models resulting from training k binary classifiers: one for each class. Each example is scored against all k models, and the model with the highest score is picked to label the example.

Constructor

new OneVsRestModel(labelMetadata, models)

Parameters:
Name Type Description
labelMetadata Metadata of label column if it exists, or Nominal attribute representing the number of classes in training dataset otherwise.
models The binary classification models for the reduction. The i-th model is produced by testing the i-th class (taking label 1) vs the rest (taking label 0).
Source:

Extends

Methods

(static) load(path) → {OneVsRestModel}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
OneVsRestModel

(static) read() → {MLReader}

Source:
Returns:
Type
MLReader

copy(extra) → {OneVsRestModel}

Parameters:
Name Type Description
extra module:eclairjs/ml/param.ParamMap
Overrides:
Source:
Returns:
Type
OneVsRestModel

hasParent() → {Promise.<boolean>}

Indicates whether this Model has a corresponding parent.
Inherited From:
Source:
Returns:
Type
Promise.<boolean>

parent() → {module:eclairjs/ml.Estimator}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.Estimator

setParent(parent) → {object}

Sets the parent of this model.
Parameters:
Name Type Description
parent module:eclairjs/ml.Estimator
Inherited From:
Source:
Returns:
Type
object

transform(dataset) → {DataFrame}

Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset
Overrides:
Source:
Returns:
Type
DataFrame

transformSchema(schema) → {StructType}

Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
Source:
Returns:
Type
StructType

write() → {MLWriter}

Source:
Returns:
Type
MLWriter