Skip to content

incremental_feature_clustering_based_compression

Bases: feature_selection_compression

The incremental feature clustering based compression function.

This class uses an incremental variance thresholding method to reduce the dimensionality of input features. It calls the incremental_variance_threshold from the tinybig.compression.incremental_variance_threshold module.

Parameters:

Name Type Description Default
D int

Number of features to retain after compression.

required
name str

Name of the transformation. Defaults to 'incremental_variance_threshold_based_compression'.

'incremental_variance_threshold_based_compression'

Methods:

Name Description
__init__

Initializes the class with the incremental variance thresholding method.

Source code in tinybig/compression/feature_selection_compression.py
class incremental_variance_threshold_based_compression(feature_selection_compression):
    """
        The incremental feature clustering based compression function.

        This class uses an incremental variance thresholding method to reduce the dimensionality of input features.
        It calls the incremental_variance_threshold from the tinybig.compression.incremental_variance_threshold module.

        Parameters
        ----------
        D : int
            Number of features to retain after compression.
        name : str, optional
            Name of the transformation. Defaults to 'incremental_variance_threshold_based_compression'.

        Methods
        -------
        __init__(D, name='incremental_variance_threshold_based_compression', *args, **kwargs)
            Initializes the class with the incremental variance thresholding method.
    """

    def __init__(self, D: int, name='incremental_variance_threshold_based_compression', *args, **kwargs):
        """
            The initialization method incremental variance thresholding based compression function.

            It initializes the class with the incremental variance thresholding method.

            Parameters
            ----------
            D : int
                Number of features to retain after compression.
            name : str, optional
                Name of the transformation. Defaults to 'incremental_variance_threshold_based_compression'.
        """
        fs_function = incremental_variance_threshold(n_feature=D)
        super().__init__(D=D, name=name, fs_function=fs_function, *args, **kwargs)

__init__(D, name='incremental_variance_threshold_based_compression', *args, **kwargs)

The initialization method incremental variance thresholding based compression function.

It initializes the class with the incremental variance thresholding method.

Parameters:

Name Type Description Default
D int

Number of features to retain after compression.

required
name str

Name of the transformation. Defaults to 'incremental_variance_threshold_based_compression'.

'incremental_variance_threshold_based_compression'
Source code in tinybig/compression/feature_selection_compression.py
def __init__(self, D: int, name='incremental_variance_threshold_based_compression', *args, **kwargs):
    """
        The initialization method incremental variance thresholding based compression function.

        It initializes the class with the incremental variance thresholding method.

        Parameters
        ----------
        D : int
            Number of features to retain after compression.
        name : str, optional
            Name of the transformation. Defaults to 'incremental_variance_threshold_based_compression'.
    """
    fs_function = incremental_variance_threshold(n_feature=D)
    super().__init__(D=D, name=name, fs_function=fs_function, *args, **kwargs)