107 points · by hardmaru · 8y ago · 35 comments
One time we had seminar where a guest speaker had used self-organising maps, and the professor literally fell off his chair.
There is similar connection between deep fully connected neural networks and Gaussian process.
Deep Neural Networks as Gaussian Processes https://arxiv.org/abs/1711.00165
Researchers like low-hanging fruit, and some results just make a topic look barren.
You are thinking different link.
If you can excuse the embarassing mess of file structure, the core lib is here, buried among a dozen other pet projects from my student days: https://github.com/KyleGalvin/Typhoon/blob/master/Cpp/SOM.cp...
Edit: it seems (on second glance) the above link is exactly the TSP problem, wired up with SDL. The core library is here: https://github.com/KyleGalvin/Typhoon/blob/master/Cpp/src/so...
I could be wrong, but that does not sound like a very good method.
But I am all for people writing blog posts and exploring methods in order to learn, of course.
Doing simple 2-opt/3-opt heuristic (10-100ms CPU time of optimization, 200 lines of code) gets you to 1-3% of the optimum.
The tools you use will also make a difference. Python is difficult to make as performant as C.
Not trivial, but IMO less trivial than self-organizing maps.
Ah, this has crossed my mind as well, but I hadn't got round to implementing it yet. You could even determine a set of independent swaps per iteration and perform them all in parallel.
I worked with Diego (the author) on a first version of this, since it was a project in the course "Artificial Intelligence Programming" IT3105 at NTNU in Trondheim, Norway where we both stayed in our Erasmus a year ago.
While it is not very sophisticated to use SOMs for this problem, it was rather meant as an implementation exercise. And TSP allows a graphical representation of the process, which is nice too. That said, we spent way too much time in the course implementing and fine tuning Genetic algorithms...
I believe that the Travelling Salesman problem abstracts the roads anyway. I.e. two points are at distance x if you can travel from one to the other in x time. This could mean that there is a fast but physically far connection like a Highway, or a very short distance over a dirt road which forces you to drive at a lower speed.
So if two points that are close (in reality) but have no direct connection should have a very high distance in the model.
This has to be taken in account when you provide the dataset, but does not make the system unfeasible.
EDIT:typos
This would significantly impact performance though.
Both Google and GraphHopper offer cost matrix calculations as part of their web API. I imagine in both cases you need an expensive API key though.
If you're going to use GraphHopper, you might as well install it yourself, import the OpenStreetMap file for the region you want, and use it to calculate the cost matrix on your own computer for free!
But you definitely need to put your Java hat on :).