Class: Pipeline

eclairjs/ml. Pipeline

A simple pipeline, which acts as an estimator. A Pipeline consists of a sequence of stages, each of which is either an module:eclairjs/ml.Estimator or a module:eclairjs/ml.Transformer. When module:eclairjs/ml.Pipeline#fit is called, the stages are executed in order. If a stage is an module:eclairjs/ml.Estimator, its module:eclairjs/ml.Estimator#fit method will be called on the input dataset to fit a model. Then the model, which is a transformer, will be used to transform the dataset as the input to the next stage. If a stage is a Transformer, its module:eclairjs/ml.Transformer#transform method will be called to produce the dataset for the next stage. The fitted model from a Pipeline is an module:eclairjs/ml.PipelineModel, which consists of fitted models and transformers, corresponding to the pipeline stages. If there are no stages, the pipeline acts as an identity transformer.

Constructor

new Pipeline(uidopt)

Parameters:
Name Type Attributes Description
uid string <optional>
Source:

Methods

(static) load(path) → {module:eclairjs/ml.Pipeline}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
module:eclairjs/ml.Pipeline

(static) read() → {module:eclairjs/ml/util.MLReader}

Source:
Returns:
Type
module:eclairjs/ml/util.MLReader

copy(extra) → {module:eclairjs/ml.Pipeline}

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

fit(dataset) → {module:eclairjs/ml.PipelineModel}

Fits the pipeline to the input dataset with additional parameters. If a stage is an Estimator, its [[Estimator#fit]] method will be called on the input dataset to fit a model. Then the model, which is a transformer, will be used to transform the dataset as the input to the next stage. If a stage is a Transformer, its [[Transformer#transform]] method will be called to produce the dataset for the next stage. The fitted model from a Pipeline is an PipelineModel, which consists of fitted models and transformers, corresponding to the pipeline stages. If there are no stages, the output model acts as an identity transformer.
Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset input dataset
Source:
Returns:
fitted pipeline
Type
module:eclairjs/ml.PipelineModel

getStages() → {Array.<module:eclairjs/ml.PipelineStage>}

Source:
Returns:
Type
Array.<module:eclairjs/ml.PipelineStage>

setStages(value) → {module:eclairjs/ml.Pipeline}

Parameters:
Name Type Description
value Array.<module:eclairjs/ml.PipelineStage>
Source:
Returns:
Type
module:eclairjs/ml.Pipeline

stages(value) → {module:eclairjs/ml/param.Param}

Parameters:
Name Type Description
value Array.<PipelineStage>
Source:
Returns:
Type
module:eclairjs/ml/param.Param

transformSchema(schema) → {module:eclairjs/sql/types.StructType}

Derives the output schema from the input schema.
Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
Source:
Returns:
Type
module:eclairjs/sql/types.StructType

uid() → {string}

An immutable unique ID for the object and its derivatives.
Source:
Returns:
Type
string

write() → {module:eclairjs/ml/util.MLWriter}

Source:
Returns:
Type
module:eclairjs/ml/util.MLWriter