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() → {MLReader}

Source:
Returns:
Type
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() → {Promise.<Array.<PipelineStage>>}

Source:
Returns:
Type
Promise.<Array.<PipelineStage>>

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

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

write() → {MLWriter}

Source:
Returns:
Type
MLWriter