I'm using the Agglomerative hierarchical cluster method to cluster a set of data. Where the dataset I use for clusrting is a trajectories. I use a custom distance function to estimate the distance between the trajectories. The matlab code is as follow: Z = linkage(ID,'single','@my_distfun');
After clustering the data; I would like to find the representative instance ( or trajectory).
How can I find the representative instance (trajectory) of each cluster?