decorators

as_absolute(func)

Decorator to convert a feature function to an absolute value feature function.

Return type:

Feature

Parameters:

func (Feature)

as_dataframe(func, keep=None, discard=None)

Decorator to convert a feature function to a dataframe feature function.

Parameters:
  • func (Feature) – The feature function to convert to a dataframe feature function.

  • keep (Iterable[str] | str | None, default: None) – Iterable of feature names (or patterns within names) to keep regardless of discard.

  • discard (Iterable[str] | str | None, default: None) – Iterable of feature names (or patterns within names) to discard.

Return type:

DataFrameFeature

as_sign_change_latency(func)

Decorator to convert a feature function to a sign change latency feature function.

Return type:

Feature

Parameters:

func (Feature)

get_inner(func)

Return the innermost feature function.

Parameters:

func (Feature | partial) – The feature function to get the innermost function from.

Return type:

Feature

Returns:

The innermost feature function.

get_prefix(func)

Return the prefix of the feature function.

Prefixes are obtained from the global PREFIXES dictionary. If a decorator is not found in the dictionary, an empty string is returned.

Parameters:

func (Feature | partial) – The feature function to get the prefix from.

Return type:

str

Returns:

The prefix of the feature function.