This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Distance Matrix in R

Hi!

I'm trying to write codes for these steps in R.

  1. Find two clusters Ci and Cj such that dij is minimum value.
  2. Let Ck => Ci & Cj.
  3. Add a vertex connecting Ci, Cj and place it at height dij/2.
  4. Delete Ci and Cj; Update the distance matrix by computing the average distance between each pair of clusters.
  5. Terminate when there's a single cluster remains.

I have a distance matrix;

image: distance matrix and I have to merge the col-row corresponding to the minimum value in each step and calculate the average distance for all and repeat it again and again until a single cluster (0) remains.

I don't know what to do or how to do. Could you help me?

Thanks

r distance-matrix

Is this an assignment?

All you've done is write down what you want to be able to do. What have you actually done?

0 answers

No answers yet.

Log in to answer this question.