scvi.external.mrvi._types.MRVIReduction#

class scvi.external.mrvi._types.MRVIReduction(name, input, fn=<function MRVIReduction.<lambda>>, group_by=None)[source]#

Bases: object

Reduction dataclass for compute_local_statistics().

Parameters:
  • name (str) – Name of the reduction. Used as the key for the corresponding DataArray.

  • input (Literal['mean_representations', 'mean_distances', 'sampled_representations', 'sampled_distances', 'normalized_distances']) –

    Type of input data, must be one of the following:

    • "mean_representations"

    • "mean_distances"

    • "sampled_representations"

    • "sampled_distances"

    • "normalized_distances"

  • fn (Callable[[DataArray], DataArray] (default: <function MRVIReduction.<lambda> at 0x7db403f72e80>)) – Function that computes the reduction.

  • group_by (str | None (default: None)) – Covariate name by which to average the computed statistics by. If None, the outputs are left at the per-cell granularity.

Attributes table#

Methods table#

fn()

Attributes#

MRVIReduction.group_by: str | None = None#
MRVIReduction.name: str#
MRVIReduction.input: Literal['mean_representations', 'mean_distances', 'sampled_representations', 'sampled_distances', 'normalized_distances']#

Methods#

MRVIReduction.fn()[source]#