DAG#
- class sdm.prior.DAG(parent_ptr: Tensor, parent_idx: Tensor, input_nodes: Tensor | None = None, target_node: int | None = None)#
Bases:
objectDirected acyclic graph in CSR layout.
- Parameters:
parent_ptr (Tensor) – Parent offsets with shape
[N + 1]forNnodes.parent_idx (Tensor) – Parent indices with shape
[E]forEedges. Each parent precedes its child.input_nodes (Tensor | None) – Optional feature node indices with shape
[F]forFfeatures.target_node (int | None) – Optional target node index.
- property pruned_topological_order: Tensor#
Return assigned nodes and their ancestors in topological order.
Return all nodes if either assignment is missing.