spatialtis.spatial_heterogeneity¶
- class spatialtis.spatial_heterogeneity(data, method='leibovici', d=None, cut=None, order=False, **kwargs)[source]¶
Evaluate tissue heterogeneity based on entropy
Entropy describes the amount of information.
Shannon entropy (No spatial info included): To compare the difference within a group (eg. different samples from same tumor), Kullback–Leibler divergences for each sample within the group are computed, smaller value indicates less difference within group.
Leibovici entropy: You can specific the distance threshold to determine co-occurrence events.
Altieri entropy: You can specific the distance interval to determine co-occurrence events.
- Parameters
data (anndata._core.anndata.AnnData) – AnnData object to perform analysis
method (Optional[str]) – “shannon”, “leibovici” and “altieri” (Default: “leibovici”)
d (Optional[int]) –
method="leibovici"
, The distance threshold to determine co-occurrence eventscut (Optional[Union[int, List, Tuple, pandas.core.series.Series, numpy.ndarray]]) –
method="altieri"
, Distance interval**kwargs – Pass to
spatialtis.abc.AnalysisBase
order (bool) –