moscot.base.problems.BirthDeathProblem.set_graph_y¶
- BirthDeathProblem.set_graph_y(data, cost='geodesic', t=None)¶
Set a graph for the target quadratic term.
- Parameters:
data (
Union[DataFrame,Tuple[csr_matrix,Series]]) –Data containing the graph.
If of type
DataFrame, its index and columns must be equal toadata_tgt.obs_names.If of type
tuple, it must be of the form (sp.csr_matrix, pd.Series), where the first element is the graph and the second element is the annotation of the graph.
cost (
Literal['geodesic']) – Which graph-based distance to use.t (
Optional[float]) – Time parameter at which to solve the heat equation, see [Crane et al., 2013]. WhentisNone,twill be set to \(\epsilon / 4\), where \(\epsilon\) is the entropy regularization term. This approaches the geodesic distance and allows for linear memory complexity as the cost matrix does not have to be instantiated [Huguet et al., 2023].
- Return type:
- Returns:
: Nothing, just updates the following fields:
x- the target quadratic term.stage- set to'prepared'.