ahc_colouring: Agglomerative Hierarchical Clustering (AHC) Colouring for Event Trees
Description
This function applies Agglomerative Hierarchical Clustering (AHC) to colour the nodes of an event tree, taking into account their outgoing edges and stage information. It returns a coloured event tree based on the computed priors.
A list containing an event tree or staged tree, and other relevant data for the event tree processing.
level_separation
Numeric value defining the level separation between nodes in the event tree (default is 1000).
node_distance
Numeric value defining the distance between nodes (default is 300).
Details
This function processes an event tree or partial staged tree, calculates priors based on the outgoing edges from each node, and performs Agglomerative Hierarchical Clustering (AHC) to colour the nodes of the event tree. It returns a visNetwork object that can be visualized as a coloured event tree. The function also computes the likelihood and scores based on merging stages in the event tree.