pyanno4rt.learning_model.preprocessing._data_preprocessor

Data preprocessing.

Overview

Classes

DataPreprocessor

Data preprocessing class.

Classes

class pyanno4rt.learning_model.preprocessing._data_preprocessor.DataPreprocessor(sequence, verbose=True)[source]

Data preprocessing class.

Parameters:
  • sequence (list) – Labels for the preprocessing algorithm classes (sequential).

  • verbose (bool, default=True) – Indicator for the display of logging messages.

steps

Dictionary with the preprocessing steps as pairs of labels and corresponding preprocessing algorithm classes.

Type:

dict

Overview

Methods

transform(features, labels)

Transform the input features/labels.

fit_transform(features, labels)

Fit the preprocessor and transform the input features/labels.

gradientize(features)

Compute the preprocessing gradient w.r.t the input features.

Members

transform(features, labels=None)[source]

Transform the input features/labels.

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

  • labels (ndarray, default=None) – Values of the input labels.

Returns:

  • ndarray – Transformed values of the input features.

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

fit_transform(features, labels=None)[source]

Fit the preprocessor and transform the input features/labels.

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

  • labels (ndarray, default=None) – Values of the input labels.

Returns:

  • ndarray – Transformed values of the input features.

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

gradientize(features)[source]

Compute the preprocessing gradient w.r.t the input features.

Parameters:

features (ndarray) – Values of the input features.

Returns:

Value of the preprocessing gradient.

Return type:

ndarray