spapros.ev.forest_classifications

spapros.ev.forest_classifications(adata, selection, max_n_forests=3, verbosity=1, save=False, outlier_kwargs={}, progress=None, task='Train hierarchical trees...', level=2, **forest_kwargs)

Train best trees including secondary trees.

Parameters:
  • adata (AnnData) – An already preprocessed annotated data matrix. Typically we use log normalised data.

  • selection (Union[list, DataFrame]) – Trees are trained on genes of the list or genes defined in the bool column selection[‘selection’].

  • max_n_forests (int) – Number of best trees considered as a tree group. Including the primary tree.

  • verbosity (int) – Verbosity level.

  • save (Union[str, bool]) – If not False load results if the given file exists, otherwise save results after computation.

  • outlier_kwargs (dict) – Parameters for get_outlier_reference_celltypes().

  • progress (Optional[Progress]) – rich.Progress object if progress bars should be shown.

  • task (str) – Description of progress task.

  • level (int) – Progress bar level.

  • **forest_kwargs – Parameters for single_forest_classifications().

Return type:

Union[list, Tuple[list, dict], Tuple[DataFrame, Dict[str, DataFrame], Dict[str, DataFrame]]]