Analysing a Dendrogram to find parent and ancestor nodes (genealogy)

2 views (last 30 days)
I have the output Z from a linkage algorithm in MATLAB. I am trying to find the genealogy of the internal nodes and leaves of the dendrogram. The genealogy is defined as the ordered set of of internal nodes connecting leaf i (internal node α_h) to the root α_1. I also want to be able to find the parent node - this is the node w of v in which w immediately precedes v on the path from the root to v. Would anyone be willing to explain how I can do this using MATLAB?
In case my definitions weren't clear enough, an example case is shown in the image.
The genealogy of leaf 3 is G(3)={α_7, α_2, α_1} and the genealogy of internal node α_7 is G(α_7)={α_7, α_2, α_1}. An example for the parents: the parent node of α_7 is α_2, which I denote as g(α_2)=α_7.
I hope now it's clearer as to what I want the code to find and do using the input of Z. Your help is much appreciated!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!