immuneML.encodings.evenness_profile package
Submodules
immuneML.encodings.evenness_profile.EvennessProfileEncoder module
- class immuneML.encodings.evenness_profile.EvennessProfileEncoder.EvennessProfileEncoder(min_alpha: float, max_alpha: float, dimension: int, name: Optional[str] = None)[source]
Bases:
immuneML.encodings.DatasetEncoder.DatasetEncoder
The EvennessProfileEncoder class encodes a repertoire based on the clonal frequency distribution. The evenness for a given repertoire is defined as follows:
\[^{\alpha} \mathrm{E}(\mathrm{f})=\frac{\left(\sum_{\mathrm{i}=1}^{\mathrm{n}} \mathrm{f}_{\mathrm{i}}^{\alpha}\right)^{\frac{1}{1-\alpha}}}{\mathrm{n}}\]That is, it is the exponential of Renyi entropy at a given alpha divided by the species richness, or number of unique sequences.
Reference: Greiff et al. (2015). A bioinformatic framework for immune repertoire diversity profiling enables detection of immunological status. Genome Medicine, 7(1), 49. doi.org/10.1186/s13073-015-0169-8
- Parameters
min_alpha (float) – minimum alpha value to use
max_alpha (between min_alpha and) – maximum alpha value to use
dimension (int) – dimension of output evenness profile vector, or the number of alpha values to linearly space
max_alpha –
YAML specification:
my_evenness_profile: EvennessProfile: min_alpha: 0 max_alpha: 10 dimension: 51
- STEP_ENCODED = 'encoded'
- STEP_VECTORIZED = 'vectorized'
- dataset_mapping = {'RepertoireDataset': 'EvennessProfileRepertoireEncoder'}
- encode(dataset, params: immuneML.encodings.EncoderParams.EncoderParams)[source]
immuneML.encodings.evenness_profile.EvennessProfileRepertoireEncoder module
- class immuneML.encodings.evenness_profile.EvennessProfileRepertoireEncoder.EvennessProfileRepertoireEncoder(min_alpha: float, max_alpha: float, dimension: int, name: Optional[str] = None)[source]
Bases:
immuneML.encodings.evenness_profile.EvennessProfileEncoder.EvennessProfileEncoder
- encode_repertoire(repertoire, params: immuneML.encodings.EncoderParams.EncoderParams)[source]
- get_encoded_repertoire(repertoire, params: immuneML.encodings.EncoderParams.EncoderParams)[source]