Skip to content

incremental_random_projection_based_compression

Bases: dimension_reduction_compression

The incremental random projection dimension reduction based data compression function.

A dimension reduction and compression class based on incremental random projections. This class uses incremental random projection methods to reduce the dimensionality of input features. It calls the incremental_random_projection from the tinybig.koala.machine_learning.dimension_reduction.incremental_random_projection module.

Methods:

Name Description
__init__

Initializes the class with the incremental random projection method.

Parameters:

Name Type Description Default
D int

Number of dimensions to retain after compression.

required
name str

Name of the transformation. Defaults to 'incremental_random_projection_based_compression'.

'incremental_random_projection_based_compression'
*args tuple

Additional positional arguments for the parent dimension_reduction_compression class.

()
**kwargs dict

Additional keyword arguments for the parent dimension_reduction_compression class.

{}
Source code in tinybig/compression/dimension_reduction_compression.py
class incremental_random_projection_based_compression(dimension_reduction_compression):
    """
        The incremental random projection dimension reduction based data compression function.

        A dimension reduction and compression class based on incremental random projections.
        This class uses incremental random projection methods to reduce the dimensionality of input features.
        It calls the incremental_random_projection from the tinybig.koala.machine_learning.dimension_reduction.incremental_random_projection module.

        Methods
        -------
        __init__(D, name='incremental_random_projection_based_compression', *args, **kwargs)
            Initializes the class with the incremental random projection method.

        Parameters
        ----------
        D : int
            Number of dimensions to retain after compression.
        name : str, optional
            Name of the transformation. Defaults to 'incremental_random_projection_based_compression'.
        *args : tuple
            Additional positional arguments for the parent `dimension_reduction_compression` class.
        **kwargs : dict
            Additional keyword arguments for the parent `dimension_reduction_compression` class.
    """
    def __init__(self, D: int, name='incremental_random_projection_based_compression', *args, **kwargs):
        """
            The incremental random projection dimension reduction based data compression function.

            Initializes the class with the incremental random projection method.

            Parameters
            ----------
            D : int
                Number of dimensions to retain after compression.
            name : str, optional
                Name of the transformation. Defaults to 'incremental_random_projection_based_compression'.
            *args : tuple
                Additional positional arguments for the parent `dimension_reduction_compression` class.
            **kwargs : dict
                Additional keyword arguments for the parent `dimension_reduction_compression` class.
        """
        dr_function = incremental_random_projection(n_feature=D)
        super().__init__(D=D, name=name, dr_function=dr_function, *args, **kwargs)

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

The incremental random projection dimension reduction based data compression function.

Initializes the class with the incremental random projection method.

Parameters:

Name Type Description Default
D int

Number of dimensions to retain after compression.

required
name str

Name of the transformation. Defaults to 'incremental_random_projection_based_compression'.

'incremental_random_projection_based_compression'
*args tuple

Additional positional arguments for the parent dimension_reduction_compression class.

()
**kwargs dict

Additional keyword arguments for the parent dimension_reduction_compression class.

{}
Source code in tinybig/compression/dimension_reduction_compression.py
def __init__(self, D: int, name='incremental_random_projection_based_compression', *args, **kwargs):
    """
        The incremental random projection dimension reduction based data compression function.

        Initializes the class with the incremental random projection method.

        Parameters
        ----------
        D : int
            Number of dimensions to retain after compression.
        name : str, optional
            Name of the transformation. Defaults to 'incremental_random_projection_based_compression'.
        *args : tuple
            Additional positional arguments for the parent `dimension_reduction_compression` class.
        **kwargs : dict
            Additional keyword arguments for the parent `dimension_reduction_compression` class.
    """
    dr_function = incremental_random_projection(n_feature=D)
    super().__init__(D=D, name=name, dr_function=dr_function, *args, **kwargs)