NumericalFeature

class NumericalFeature[source]

Bases: object

Utility feature engineering class to process and filter numerical data structures, such as amino acid scales or a feature matrix.

It provides numeric helpers for the CPP feature engineering pipeline: extending the amino acid alphabet of a scale DataFrame, slicing per-residue tensors into sequence parts (numerical analog of SequenceFeature.get_df_parts()), and removing redundant features by Pearson correlation.

Added in version 0.1.3.

Methods

extend_alphabet(df_scales, new_letter[, ...])

Extend amino acid alphabet of df_scales by new letter.

filter_correlation(X[, max_cor])

Filter features based on Pearson correlation.

get_parts(df_seq, dict_num[, list_parts, ...])

Prepare Comparative Physicochemical Profiling (CPP) numerical-mode inputs by slicing sequences AND per-residue tensors with shared boundaries.