Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: RFC: Conceptual association

by hawtin (Prior)
on Oct 10, 2008 at 11:53 UTC ( #716434=note: print w/ replies, xml ) Need Help??


in reply to RFC: Conceptual association

I had a similar problem (with a multi-dimensional set of distances between each pair, but I don't think that makes a difference). My solution was to use a "simulated-annealing" approach. A pseudo-code description would be something like

my @items my @best_layout my $least_error for (0..100) { foreach @items add to layout at random x,y best_error_measure = sum of badness of all inter-item distances my $jiggle_distance = largish while($jiggle_distance > smallish) { randomly pick item try it in four alternate locations (up, down, left, right) if(new_error_measure < best_error_measure) keep the item in its best new location else jiggle_distance *= 0.95 } if(best_error_measure < least_error) { save layout into best_layout least_error = best_error_measure } }

This has the advantage that you can take any consideration into account when measuring the "badness" of a layout, for example are there items you want near the centre. For my data it very rapidly converged on a reasonable solution (the optimal solution would have taken much longer but I just needed something that was "good enough").

For my particular data the standard "cluster analysis" approaches gave poor results, and I wanted a two dimensional display of the results.


Comment on Re: RFC: Conceptual association
Download Code
Re^2: RFC: Conceptual association
by lima1 (Curate) on Oct 10, 2008 at 13:13 UTC
    For my particular data the standard "cluster analysis" approaches gave poor results, and I wanted a two dimensional display of the results.

    Just out of curiosity, what method gave poor results? A PCA normally does a good job in such a visualization of multi-dimensional data.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-08-31 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls