(Clojure :in Tunisia)

Reading "Clojure for Machine Learning"
by Akhil Wali - Packt Publishing Editions

Published on 20 May 2014


I am these days reading “Clojure for Machine Learning”, and I wanted to share my thoughts on it.

The title was highly appealing to me as retrospectively, being interested in machine learning techniques in general (and recommending engines in particular) was the very thing that made me fall in love with clojure in the first place.

In fact, while documenting myself about the field of creating “programs learning from data”, only two kinds of references could cross my path : Those “too academic”, which I couldn’t grasp in entirety to tell the truth, or those “too pragmatic”, at the other hand, only concerned with a particular machine learning library. I nevertheless managed - by collecting bits and pieces here and there - to devise a little recommender, that I developed in Clojure. But I strongly wished I had at hand a manual covering theory - at a fair level of detail - and implementation strategies, hopefully in my preferred language.

So it is like the author was aware of my case when he wrote “Clojure for Machine Learning”. But will the book strike the balance I am looking for, between theory and real-world application in Clojure ?

This is rather a daunting task, but I think the author brilliantly succeeded at it.

In fact, the book does an excellent job introducing and explaining the math and theoretical matters that fuel subjects like matrix operations, regression, classification, neural networks, SVMs, etc… All at a fair level of detail. But fear not, intuition behind the concepts or real-life examples are always given to light your path.

The pace by which the explanations go is overall fine, though sometimes too quick for me, but nothing too tricky to handle : in general it is only a matter of a second reading and I am good to go. Beware though: you must be comfortable with math notation in order to be able to fully understand the algorithms, but assuming you deal with software writing to make a living (or just for fun), it should not be a big deal for you to translate some math grand Sigma and Pi signs into more familiar loop or reduce constructs.

As the theoretical concepts are worked through, annotated idiomatic Clojure snippets come to illustrate quite elegant implementations using relevant tools in the ecosystem. Code is always thoroughly commented and very often the author explains the rationale behind the design choices he makes. Actually, he follows a strong discipline while writing his snippets, making heavy use of destructuring, :pre conditions to sanitize functions' input… - to cite but a few examples.

The book also shows quite well-architectured design in the functional spirit, starting from little bits, making them grow more general and re-using them in bigger parts. When applicable, the author showcases a library that does just what was developed, so we don’t have to reinvent the wheel. I liked this approach because now I am aware of what happens under the hood when using one of these libraries, so I can make best possible use of them.

The book gives at the end some resources to get you started on addressing real world-large scale deployments.

So is reading “Clojure for Machine Learning” worth it ? Definitely. It is a journey in which I encountered a wealth of academic background well served by well-cooked clojure, just what I was looking for.



by Akhil Wali - Packt Publishing Editions" > Tweet
comments powered by Disqus

From the Top ...