pipeline module¶
Data transformer pipeline¶
The Pipeline
class chains a sequence of tranformers, and provides
global fit(), transform(), fit_transform() and inverse_transform() methods.
-
class
gemseo.mlearning.transform.pipeline.
Pipeline
(name='Pipeline', transformers=None)[source]¶ Bases:
gemseo.mlearning.transform.transformer.Transformer
Transformer pipeline.
Constructor.
- Parameters
name (str) – transformer pipeline name. Default: ‘Pipeline’.
transformers (list(Transformer)) – Sequence of transformers to be chained. The transformers are chained in the order of appearance in the list, i.e. the first transformer is applied first. If transformers is an empty list or None, then the pipeline transformer behaves like an identity transformer. Default: None.
-
compute_jacobian
(data)[source]¶ Compute Jacobian of the pipeline transform.
- Parameters
data (ndarray) – data where the Jacobian is to be computed.
- Returns
Jacobian matrix.
- Return type
ndarray
-
compute_jacobian_inverse
(data)[source]¶ Compute Jacobian of the pipeline inverse_transform.
- Parameters
data (ndarray) – data where the Jacobian is to be computed.
- Returns
Jacobian matrix.
- Return type
ndarray
-
fit
(data)[source]¶ Fit transformer pipeline to data. All the transformers are fitted, transforming the data along the way.
- Parameters
data (ndarray) – data to be fitted.