anndict.annotate.krippendorff_alpha_adata

anndict.annotate.krippendorff_alpha_adata#

anndict.annotate.krippendorff_alpha_adata(adata, cols, level_of_measurement='nominal')[source]#

Calculate Krippendorff’s Alpha for categorical data in adata.obs[cols].

Parameters:
adata AnnData

An AnnData object.

cols list[str]

List of columns in adata.obs to use for calculating agreement.

level_of_measurement str (default: 'nominal')

The type of data ('nominal', 'ordinal', 'interval', 'ratio'). Default is 'nominal' (for categorical data).

Return type:

float

Returns:

float Krippendorff’s Alpha for the specified columns in adata.obs.