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
Classes:
|
Transformer baseclass. |
- class gemseo.mlearning.transform.transformer.Transformer(name='Transformer', **parameters)[source]¶
Bases:
object
Transformer baseclass.
- Attributes
name (str) – The name of the transformer.
parameters (str) – The parameters of the transformer.
- Parameters
name (str) – A name for this transformer.
**parameters – The parameters of the transformer.
parameters (Optional[Union[float,int,str,bool]]) –
- Return type
None
Attributes:
Methods:
compute_jacobian
(data)Compute Jacobian of transformer.transform().
compute_jacobian_inverse
(data)Compute Jacobian of the transformer.inverse_transform().
Duplicate the current object.
fit
(data, *args)Fit the transformer to the data.
fit_transform
(data, *args)Fit the transformer to the data and transform the data.
inverse_transform
(data)Perform an inverse transform on the data.
transform
(data)Transform the data.
- CROSSED = False¶
- compute_jacobian(data)[source]¶
Compute Jacobian of transformer.transform().
- Parameters
data (numpy.ndarray) – The data where the Jacobian is to be computed.
- Returns
The Jacobian matrix.
- Return type
NoReturn
- compute_jacobian_inverse(data)[source]¶
Compute Jacobian of the transformer.inverse_transform().
- Parameters
data (numpy.ndarray) – The data where the Jacobian is to be computed.
- Returns
The Jacobian matrix.
- Return type
NoReturn
- 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.
- Parameters
data (numpy.ndarray) – The data to be fitted.
args (Union[float, int, str]) –
- Return type
NoReturn
- fit_transform(data, *args)[source]¶
Fit the transformer to the data and transform the data.
- Parameters
data (numpy.ndarray) – The data to be transformed.
args (Union[float, int, str]) –
- Returns
The transformed data.
- Return type
numpy.ndarray