grassp.tl.ccompass_default_params

grassp.tl.ccompass_default_params#

ccompass_default_params(as_dict=False, path=None)[source]#

Return (and optionally save) the default C-COMPASS hyperparameters used by ccompass().

Use this to discover, inspect, and customize the parameters:

import grassp as gr

gr.tl.ccompass_default_params()  # every field + default
gr.tl.ccompass_default_params(path="params.yaml")  # editable template
gr.tl.ccompass(adata, marker_key="marker", nn_params="params.yaml")

These are C-COMPASS’s NeuralNetworkParametersModel defaults with grassp’s one override, NN_optimization="short" (the C-COMPASS-paper setting; C-COMPASS’s own default is "long"). Every field is a valid nn_params key.

Parameters:
as_dict bool (default: False)

If True return a plain dict (model_dump()) instead of the pydantic model. Ignored when only writing a file.

path str | None (default: None)

If given, write the defaults to this YAML file (a template you can edit and pass back as nn_params).

Returns:

A NeuralNetworkParametersModel (or dict if as_dict).