naive_chi2_probabilistic_compression
Bases: naive_probabilistic_compression
A Chi-squared probabilistic compression class.
This class samples features using a Chi-squared distribution with a specified degree of freedom (df).
Methods:
Name | Description |
---|---|
__init__ |
Initializes the Chi-squared probabilistic compression function. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the transformation. Defaults to 'naive_chi2_probabilistic_compression'. |
'naive_chi2_probabilistic_compression'
|
df
|
float
|
Degrees of freedom for the Chi-squared distribution. Defaults to 1.0. |
1.0
|
require_normalization
|
bool
|
If True, normalizes the input tensor before sampling. Defaults to True. |
True
|
Source code in tinybig/compression/probabilistic_compression.py
__init__(name='naive_chi2_probabilistic_compression', df=1.0, require_normalization=True, *args, **kwargs)
Initializes the Chi-squared probabilistic compression function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the transformation. Defaults to 'naive_chi2_probabilistic_compression'. |
'naive_chi2_probabilistic_compression'
|
df
|
float
|
Degrees of freedom for the Chi-squared distribution. Defaults to 1.0. |
1.0
|
require_normalization
|
bool
|
If True, normalizes the input tensor before sampling. Defaults to True. |
True
|