1<span style="float:right;"><a href="https://github.com/RubixML/ML/blob/master/src/Pipeline.php">[source]</a></span>
2
3# Pipeline
4Pipeline is a meta-estimator capable of transforming an input dataset by applying a series of [Transformer](transformers/api.md) *middleware*. Under the hood, Pipeline will automatically fit the training set and transform any [Dataset](datasets/api.md) object supplied as an argument to one of the base estimator's methods before reaching the method context. With *elastic* mode enabled, Pipeline will update the fitting of [Elastic](transformers/api.md#elastic) transformers during partial training.
5
6!!! note
7    Pipeline modifies the input dataset during fitting. If you need to keep a *clean* dataset in memory, you can clone the dataset object before calling the method that consumes it.
8
9**Interfaces:** [Wrapper](wrapper.md), [Estimator](estimator.md), [Learner](learner.md), [Online](online.md), [Probabilistic](probabilistic.md), [Scoring](scoring.md), [Persistable](persistable.md), [Verbose](verbose.md)
10
11**Data Type Compatibility:** Depends on base learner and transformers
12
13## Parameters
14| # | Name | Default | Type | Description |
15|---|---|---|---|---|
16| 1 | transformers |  | array | A list of transformers to be applied in order. |
17| 2 | estimator |  | Estimator | An instance of a base estimator to receive the transformed data. |
18| 3 | elastic | true | bool | Should we update the elastic transformers during partial training? |
19
20## Example
21```php
22use Rubix\ML\Pipeline;
23use Rubix\ML\Transformers\MissingDataImputer;
24use Rubix\ML\Transformers\OneHotEncoder;
25use Rubix\ML\Transformers\PrincipalComponentAnalysis;
26use Rubix\ML\Classifiers\SoftmaxClassifier;
27
28$estimator = new Pipeline([
29	new MissingDataImputer(),
30	new OneHotEncoder(),
31	new PrincipalComponentAnalysis(20),
32], new SoftmaxClassifier(128), true);
33```
34
35## Additional Methods
36This meta-estimator does not have any additional methods.
37