in reply to Data visualisation.
I've been thinking along those lines myself, and coded up a distance-matrix to coordinates program (current code in Re^2: Data visualisation. (updated)). However, the data doesn't seem to map into a planar representation. I'm thinking about (but haven't started) mixing in force-directed layout to build a planar mapping listing the stress forces along the edges and force vector from each node to approximate a 2D layout.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data visualisation.
by LanX (Saint) on Jan 02, 2014 at 13:54 UTC | |
Did you check if the data conforms to the Triangle_inequality ? If not I doubt that any sane visualization is possible.
updatewell at least with straight lines... ... but I fear with curved lines it might always be possible but not usable!
Cheers Rolf ( addicted to the Perl Programming Language) | [reply] |
by roboticus (Chancellor) on Jan 02, 2014 at 15:14 UTC | |
LanX: No, I didn't think to do that. It's a trivial check, so when I get home, I'll try to remember to add that. (Unfortunately, the security restrictions at work make it extremely difficult to actually do any coding.) Update: I've now added the triangle inequality check in the version at Re: Data visualisation.. Update 2: There was an error in my triangle inequality check (it didn't affect my original results, because my code didn't use any of the invalid triangles--by luck, not design). The error was that I only made one of the three checks required. The new check function is:
I also added an exhaustive check at the end:
The exhaustive check gives the following misses:
...roboticus When your only tool is a hammer, all problems look like your thumb. | [reply] [d/l] [select] |
by LanX (Saint) on Jan 04, 2014 at 09:38 UTC | |
> triangle inequality check Already a visual test reveals that projecting the data into 2D wouldn't make sense:
27 + 47 = 74 < 77
Cheers Rolf ( addicted to the Perl Programming Language)
updates
| [reply] [d/l] [select] |
by roboticus (Chancellor) on Jan 04, 2014 at 21:44 UTC | |
by BrowserUk (Patriarch) on Jan 05, 2014 at 03:26 UTC | |
| |
| |
by LanX (Saint) on Jan 06, 2014 at 10:22 UTC | |
> Update 2... The exhaustive check gives the following misses: wow ...indeed "a mess of bad triangles". TSP publications reach back to before the 1950s and IIRC the data was mostly taken from German or Swiss cities. 17 cities is a rather small and surely old example and I think at that time they just copied the kilometers from a tourist guide or train schedule or similar, w/o taking much care. So my theory was that just reaching the city limits naturally causes an error for large communities like Berlin or Zürich. But I don't think it's worth to try to correct this now with something like a fuzzy surface in the visualization, better try starting from the beginning with real coordinates. At least I think questioning the quality in my first reply was justified, it's worth checking data before trying to work with it.
Cheers Rolf ( addicted to the Perl Programming Language) | [reply] |
|
Re^2: Data visualisation.
by BrowserUk (Patriarch) on Jan 02, 2014 at 14:02 UTC | |
coded up a distance-matrix to coordinates program Thanks. That's very helpful. However, the data doesn't seem to map into a planar representation. I assume you mean the OP data in the TSP thread. This data has nothing to do with that data. (Though it was the trigger for my current interest.) My first postulate: the maximum size of the plane required is: xMax = yMax = 1.23 * sqrt( max_distance2 / 2 ). With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
by roboticus (Chancellor) on Jan 02, 2014 at 15:23 UTC | |
I'm glad you found it useful. The problem was interesting, so I kept playing around with it. And yes, I was referring to the OP data in the TSP thread--I haven't had a chance to check out your distance data yet. In my initial replies, I read my browser tabs out of order and rather than noticing that this was a new thread, I thought I was working in that thread, so I probably made a few mistakes in that regard. Another possibility I've been thinking about is to add a Z coordinate to see if the data could be made consistent that way. (Again referring to OP TSP data.) But if the data represents miles travelled (i.e. along the road, rather than as the crow flies), adding a single degree of freedom is probably insufficient. ...roboticus When your only tool is a hammer, all problems look like your thumb. | [reply] |
by BrowserUk (Patriarch) on Jan 02, 2014 at 16:54 UTC | |
(Again referring to OP TSP data.) But if the data represents miles travelled (i.e. along the road, rather than as the crow flies), adding a single degree of freedom is probably insufficient. Indeed. Road routes are rarely straight lines. That's why I obtained a different* set of data for experimenting with. (*As well as smaller (quicker to process) and with a known solution.) With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |