simba.tl.softmax

simba.tl.softmax(adata_ref, adata_query, T=0.5, n_top=None, percentile=0)[source]

Softmax-based transformation

This will transform query data to reference-comparable data

Parameters:
  • adata_ref (AnnData) – Reference anndata.

  • adata_query (list) – Query anndata objects

  • T (float) – Temperature parameter. It controls the output probability distribution. When T goes to inf, it becomes a discrete uniform distribution, each query becomes the average of reference; When T goes to zero, softargmax converges to arg max, each query is approximately the best of reference.

  • n_top (float (default: None)) – The number of top reference entities to include when transforming entities in query data. It is used to filter out low-probability reference entities. All reference entities used by default.

  • percentile (int (default: 0)) – Percentile (0-100) of reference entities to exclude when transforming entities in query data. Only valid when n_top is not specified. It is used to filter out low-probability reference entities. All reference entities used by default.

Returns:

  • updates adata_query with the following field.

  • softmax (array_like (.layers[‘softmax’])) – Store #observations × #dimensions softmax transformed data matrix.