pyanno4rt.learning_model.preprocessing.transformers._identity

Identity transformer.

Overview

Classes

Identity

Identity transformer class.

Classes

class pyanno4rt.learning_model.preprocessing.transformers._identity.Identity[source]

Identity transformer class.

This class provides methods to fit, transform and gradientize the input features by their identity (default preprocessing step).

Overview

Methods

fit(features, labels)

Fit the identity transformer.

transform(features, labels)

Transform the input features/labels.

compute_gradient(features)

Compute the identity transformer gradient w.r.t the input features.

Members

fit(features, labels)[source]

Fit the identity transformer.

Parameters:
  • features (ndarray) – Values of the input features.

  • labels (None or ndarray) – Values of the input labels.

transform(features, labels)[source]

Transform the input features/labels.

Parameters:
  • features (ndarray) – Values of the input features.

  • labels (None or ndarray) – Values of the input labels.

Returns:

  • ndarray – Transformed values of the input features.

  • None or ndarray – Transformed values of the input labels.

compute_gradient(features)[source]

Compute the identity transformer gradient w.r.t the input features.

Parameters:

features (ndarray) – Values of the input features.

Returns:

Value of the identity transformer gradient.

Return type:

ndarray