Skip to content

featurecombiner

featurecombiner

Module for feature combiner

Classes

FeatureCombiner

Bases: ABC

FeatureCombiner that can combine column-based features as part of a DfDataset to create new features.

Functions
combine_features abstractmethod
combine_features(data)

The combine_features function takes in a dataframe and returns a new dataframe with the features combined. The features to be combined must be initialized in the __init__ of the concrete class implementation.

Parameters:

  • data (DataFrame) –

    pd.DataFrame: Pass in the dataframe that we want to transform

Returns:

  • DataFrame

    A dataframe with the new features

Source code in niceml/data/featurecombiners/featurecombiner.py
@abstractmethod
def combine_features(self, data: pd.DataFrame) -> pd.DataFrame:
    """
    The combine_features function takes in a dataframe and returns a new dataframe
    with the features combined. The features to be combined must be initialized
    in the `__init__` of the concrete class implementation.

    Args:
        data: pd.DataFrame: Pass in the dataframe that we want to transform

    Returns:
        A dataframe with the new features
    """