transformer module¶
A transformer to apply operations on NumPy arrays.
The abstract Transformer class implements the concept of a data transformer.
Inheriting classes shall implement the Transformer.fit(),
Transformer.transform()
and possibly Transformer.inverse_transform() methods.
See also
- class gemseo.mlearning.transformers.transformer.Transformer(name='Transformer', **parameters)[source]
Bases:
objectA data transformer fitted from some samples.
- Parameters:
name (str) –
A name for this transformer.
By default it is set to “Transformer”.
**parameters (ParameterType) – The parameters of the transformer.
- compute_jacobian(data)[source]
Compute the Jacobian of
transform().
- compute_jacobian_inverse(data)[source]
Compute the Jacobian of the
inverse_transform().
- duplicate()[source]
Duplicate the current object.
- Returns:
A deepcopy of the current instance.
- Return type:
- fit(data, *args)[source]
Fit the transformer to the data.
- fit_transform(data, *args)[source]
Fit the transformer to the data and transform the data.
- inverse_transform(data)[source]
Perform an inverse transform on the data.
- abstract transform(data)[source]
Transform the data.
- property is_fitted: bool
Whether the transformer has been fitted from some data.
- name: str
The name of the transformer.
- class gemseo.mlearning.transformers.transformer.TransformerFactory[source]
Bases:
BaseFactoryA factory of
Transformer.- Return type: