SpaSRL.select_landmarks#

SpaSRL.select_landmarks(adata, n_landmarks, Lambda=0.5, reltol=0.001, use_highly_variable=None, random_state=0, copy=False)[source]#

Select landmark samples [Matsushima19].

Parameters:
adata : AnnData

Annotated data matrix.

n_landmarks : int

Number of landmarks to be selected.

Lambda : float (default: 0.5)

Hyperparameter for sparsity regularization.

reltol : float (default: 0.001)

Relative tolerance in optimization.

use_highly_variable : bool | NoneOptional[bool] (default: None)

Whether to use highly variable genes only, stored in adata.var[‘highly_variable’]. By default uses them if they have been determined beforehand.

random_state : int (default: 0)

Change to use different initial states for the optimization.

copy : bool (default: False)

Return a copy instead of writing to adata.

Return type:

AnnData | NoneOptional[AnnData]

Returns:

Depending on copy, returns or updates adata with the following fields.

.obs[‘is_landmark’]

Boolean indicator of landmark samples.