in reply to Re: Pair-Wise Clustering
in thread Pair-Wise Clustering

I need to write a code that determines the clusters from the table. From the table above, I would get four clusters. Cluster#1 would have 5 elements. Cluster#2 would have 3 elements. Cluster 3 and 4 would have 1 element each. I would like to stores these elements of each cluster in the form below

 $cluster_60[element]{cluster#}

After after adding all the elements to each cluster, then the following could be obtained

 $cluster_60[0]{3} = 9

I need some sort of hierarchial/single-linkage algorithm, but I can't find exactly what I need.

Replies are listed 'Best First'.
Re^3: Pair-Wise Clustering
by Anonymous Monk on Oct 01, 2009 at 01:48 UTC
    Your word explanations aren't sinking into my brain. Is the perl data structure I showed the one you want or not?

      Yes, I believe that is the correct data structure. I have used this data structure to count occurrences of dna motifs at various positions. Say, I wanted to count and store the total occurences of A, C, G, T in 1000 nucleotide sequences that are 10 nucleotides long at each position. If you wanted a hash of arrays with the keys being A,C,G,T and the elements being positions 1 through 10, then

      $position[10]{A}

      would equal the frequency of A at position 10 if you define position 1 as element 1. ... anyway, yes, this is the data structure that I want to store the clusters in, but I still need to figure out how to write a code to determine those clusters. I am still working on it. I think that I might have figured it out, though it is quite crude.