gemseo / mlearning / transformers / sensor

Hide inherited members

jameson module

A 1D Jameson sensor.

class gemseo.mlearning.transformers.sensor.jameson.JamesonSensor(name='', threshold=0.3, removing_part=0.01, dimension=1)[source]

Bases: BaseTransformer

A 1D Jameson Sensor.

Parameters:
  • name (str) –

    A name for this transformer.

    By default it is set to “”.

  • threshold (float) –

    The value to add to the denominator to avoid zero division.

    By default it is set to 0.3.

  • removing_part (float) –

    The level of the signal to remove in order to avoid leading and trailing edge effects.

    By default it is set to 0.01.

  • dimension (int) –

    The dimension of the mesh.

    By default it is set to 1.

compute_jacobian(data)

Compute the Jacobian of transform().

Parameters:

data (ndarray) – The data where the Jacobian is to be computed, shaped as (n_observations, n_features) or (n_features, ).

Returns:

The Jacobian matrix, shaped according to data.

Return type:

NoReturn

compute_jacobian_inverse(data)

Compute the Jacobian of the inverse_transform().

Parameters:

data (ndarray) – The data where the Jacobian is to be computed, shaped as (n_observations, n_features) or (n_features, ).

Returns:

The Jacobian matrix, shaped according to data..

Return type:

NoReturn

duplicate()

Duplicate the current object.

Returns:

A deepcopy of the current instance.

Return type:

BaseTransformer

fit(data, *args)

Fit the transformer to the data.

Parameters:
  • data (ndarray) – The data to be fitted, shaped as (n_observations, n_features) or (n_observations, ).

  • args (float | int | str)

Return type:

None

fit_transform(data, *args)

Fit the transformer to the data and transform the data.

Parameters:
  • data (ndarray) – The data to be transformed, shaped as (n_observations, n_features) or (n_observations, ).

  • args (float | int | str)

Returns:

The transformed data, shaped as data.

Return type:

ndarray

inverse_transform(data)

Perform an inverse transform on the data.

Parameters:

data (ndarray) – The data to be inverse transformed, shaped as (n_observations, n_features) or (n_features, ).

Returns:

The inverse transformed data, shaped as data.

Return type:

NoReturn

transform(data, *args, **kwargs)

Force a NumPy array to be 2D and evaluate the function f with it.

Parameters:
  • data (ndarray) – A 1D or 2D NumPy array.

  • *args (Any) – The positional arguments.

  • **kwargs (Any) – The optional arguments.

Returns:

Any kind of output; if a NumPy array, its dimension is made consistent with the shape of data.

Return type:

Any

CROSSED: ClassVar[bool] = False

Whether the fit() method requires two data arrays.

property is_fitted: bool

Whether the transformer has been fitted from some data.

name: str

The name of the transformer.

property parameters: dict[str, bool | int | float | ndarray | str | None]

The parameters of the transformer.