calculate_path_products {stCEG} | R Documentation |
Calculate Path Products in a Chain Event Graph (CEG)
Description
This function calculates the products of probabilities along all paths from a specified root node in a Chain Event Graph (CEG). It traverses the graph, multiplying the posterior means of the edges for each path, and returns the resulting paths and their products.
Usage
calculate_path_products(nodes_df, edges_df, root_node = "w0")
Arguments
nodes_df |
A data frame representing the nodes in the CEG. |
edges_df |
A data frame representing the edges in the CEG, containing columns for |
root_node |
A string specifying the label of the root node from which to start the traversal. Default is "w0". |
Value
A data frame with two columns:
path |
The sequence of nodes in the path, as a string of node labels separated by " -> " |
product |
The product of the posterior means along the path |
[Package stCEG version 0.1.0 Index]