liana.method.find_causalnet¶
- liana.method.find_causalnet(prior_graph, input_node_scores, output_node_scores, node_weights=None, node_cutoff=0.1, min_penalty=0.01, max_penalty=1.0, missing_penalty=10, edge_penalty=0.01, solver=None, seed=1337, max_runs=1, stable_runs=5, verbose=True, **kwargs)¶
Find the causal network that best explains the input/output node scores.
- Parameters:
- prior_graphcorneto.Graph
The prior graph to use for the search.
- input_node_scoresdict
A dictionary of input node scores.
- output_node_scoresdict
A dictionary of output node scores.
- node_weightsdict, optional
A dictionary of node weights. The keys are the node names, the values are the weights. If None, all nodes will have the same weight.
- node_cutofffloat
The cutoff to use for the node weights. Nodes with a weight below this cutoff will be assigned the max_penalty, nodes with a weight above this cutoff will be assigned the min_penalty. Only used if node_weights is not None. Default: 0.1
- min_penaltyfloat
The minimum penalty to assign to nodes with a weight above the cutoff. Only used if node_weights is not None. Default: 0.01
- max_penaltyfloat
The maximum penalty to assign to nodes with a weight below the cutoff Only used if node_weights is not None. Default: 1.0
- missing_penaltyfloat
The penalty to assign to nodes that are not measured. Default: 10
- edge_penaltyfloat
The penalty to assign to edges. Default: 0.01
- solverstr, optional
The solver to use. If None, the default solver will be used. Default: None It will default to the solver included in SCIPY, if no other solver is available.
- seedint, optional
The seed to use for the random number generator. Default: 1337
- max_runsint, optional
The maximum number of runs to perform. Consider increasing this value if the solver does not converge. In each run, the noise added to the edge and node penalties is perturbed slightly (iterating over the seed). By default, only 1 run is performed.
- stable_runsint, optional
The number of consecutive stable solutions requires to interrupt the iteration over max_runs. Only used if max_runs is not == 1. Default: 5
- verbosebool, optional
Whether to print progress information. Default: True
- **kwargsdict, optional
Additional arguments to pass to the solver.