Thursday, April 21, 2016

Functional algorithms

I've written plenty of algorithms and I've written plenty of functional code. Oddly enough, I've never had cause to specify an algorithm in functional terms (at least, not a significant one, I'm sure I had to write some trivial stuff for a class at some point).

Functional pseudocode is both beautiful and a bit unsettling. Add in the vectorization that comes from R and it's not at all clear at first glance what the time complexity for an algorithm is. Nor is it terribly obvious that the algorithm actually works. As my "algorithm" for the SA Clustering is actually a heuristic (meaning, it's not guaranteed to work), the whole thing just starts looking a bit shaky.

That said, I'm rather enjoying coding this thing up in R. I expect to have something running tomorrow. It will either work or it won't, but it's been good to give it a try.

No comments:

Post a Comment