NumericalFeature
- class NumericalFeature[source]
Bases:
objectUtility 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
CPPfeature engineering pipeline: extending the amino acid alphabet of a scale DataFrame, slicing per-residue tensors into sequence parts (numerical analog ofSequenceFeature.get_df_parts()), reconstructing the model matrixXfromCPP.run_num()-selected features (feature_matrix()), 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_scalesby new letter.feature_matrix(features, dict_num_parts, ...)Create the numerical-mode feature matrix
Xfor given feature ids and per-part tensors.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.