[futurebasic] Bid on this job

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2000 : Group Archive : Group : All Groups

From: Pierre Zippi <biostrat@...>
Date: Thu, 23 Nov 2000 10:42:13 -0600
Dear list,

Draw a dendrogram.

I need help and I'm willing to pay for it (within reason).
Now that I am geology consulting full-time, I seem to have lees time to
figure out algorithms.

I need help programming the logic for assembling a dendrogram from
cluster analysis results.
I think this is relatively easy but it hasn't come to me yet. I written
all the matrix stuff. I now need to draw a dendrogram.

Brief description of cluster analysis:
Given:
A rectangular matrix of samples in rows and observations in columns.
For example:
Various models of cars in rows and in columns are things like MPG,
acceleration, braking distance, price, weight, etc. The intersecting
cells of the matrix are filled with appropriate values.

Now the samples may be analyzed for one of several measures:
Similarity between samples (numerous methods)
Distance between sample (also numerous methods)
I'll use similarity in this example.
1) A similarity matrix is calculated
Here's where it becomes cluster analysis versus a correlation matrix.
2) Next, the two most similar samples are clustered at their level of
similarity and the matrix is reduced accordingly. 
3) A similarity matrix of the remaining samples and the first cluster is calculated
4) This process is iterated until all samples are clustered and indeed
until all clusters are clustered.
5) A dendrogram (tree-like diagram) is drawn showing connections between
samples and clusters at the appropriate similarity level.
In the example below, a & b are most similar, c & e are next most
similar, d is more similar to a & b than c & e.

a---|
      |-----|
b---|       |-------------|
              |                 |
d---------|                 |
                                |    
c-------|                    |
           |---------------|
e-------|

|-----|-----|-----|-----|-----|
1     .9    .8    .7    .6    .5 Similarity

I have written all steps except for the logic how to draw the dendrogram.
Theoretically, this should be very easy as shown above.
Join samples/clusters at their respective similarity level until they
are all joined without crossing lines.
The plotting the similarity level is simple.
**Figuring out the vertical sequence of the samples so that no lines
cross is where I have a mental block.**

I have many references and even examples in Fortran (full of GOTOs)
I need code that is FBII and GOTO-free.
Can anyone help?
If so, contact me off-line.

-- 
Dr. Pierre A. Zippi
Biostratigraphy.com
7518 Twin Oaks Court
Garland, TX 75044 USA

972-496-3642

paz@...
http://www.biostratigraphy.com

paz@...
http://www.pazsoftware.com