binary_unique_value_features#
- tangles.convenience.binary_unique_value_features(single_col_data: Series | ndarray, unique_values: list | ndarray, op: str = '==') Tuple[ndarray, ndarray] #
A feature factory function for binary variables.
Parameters#
- single_col_datapd.Series or np.ndarray
The featured data.
- unique_valueslist or np.ndarray
Unique values in single_col_data.
- op{‘==’, ‘!=’, ‘<’, ‘<=’, ‘>’, ‘>=’}
The operation used to describe the feature in its metadata. Defaults to ‘==’.
Returns#
- tuple[np.ndarray, np.ndarray]
The features in the first entry and the corresponding metadata in the second entry.