athena.utils.tools.metric module

Summary

Functions:

compute_metrics

type df

Union[DataFrame, Series]

extract_metric_results

Extract all the computed results from the spatialOmics instance.

get_group_feature

Reference

compute_metrics(df, metrics, key=None, metrics_kwargs={}, name=None)[source]
Parameters
  • df (pd.DataFrame or pd.Series) – DataFrame or Series with the counts of the species in a column defined by key (if DataFrame).

  • metrics (callable or list of) – A list of functions that take counts and output a numpy.ndarray.

  • key (str or None) – If df is a DataFrame the key indicates which column the counts are.

Return type

DataFrame

get_group_feature(expr, groups, reducer, axis=0, **kwargs)[source]
extract_metric_results(so)[source]

Extract all the computed results from the spatialOmics instance.

Parameters

so

Returns: