Google’s Go language ventures into machine learning
21 September 2016 | 0
Machine learning developers who want to use Google’s Go language as their development platform have a small but growing number of projects to choose from.
Rather than call out to libraries written in other languages, chiefly C/C++, developers can work with machine learning libraries written directly in Go. Existing machine learning libraries in other languages have a far larger culture of users, but there is clearly an interest in having Go toolkits that take advantage of the language’s conveniences.
GoLearn, described as a “batteries included” machine learning library, is one of the most prominent. “Simplicity, paired with customisability, is the goal,” the developers write in their introduction to the project. Some of GoLearn’s interfaces to data handling are implemented in the same manner as scikit-learn, a popular Python machine learning project. Python refugees ought to be able to make short work of it. There is a modest amount of C++ used for the linear models library, but the rest is pure Go.
Goml bills itself as “Golang machine learning, on the wire,” meaning it “includes many models which let you learn in an online, reactive manner by passing data to streams held on channels,” according to the developers. The project stands out by emphasising its possibilities as a component for other applications, made easier by “comprehensive tests, extensive documentation, and clean, expressive, modular source code.” If all you need is something for basic binary classification problems, a smaller library named Hector will fit the bill.
The newest of the bunch, and in some ways most intriguing, is Gorgonia. This machine learning library, written entirely in Go, “provides the necessary primitives to dynamically build neural networks and assorted machine learning algorithms,” according to the author, a Sydney, Australia-based developer who goes by the nick “chewxy.”
The key adjective is “dynamic.” Like the machine learning library Theano before it, Gorgonia lets you describe the behaviour of a neural network in fairly high-level terms with a set of library primitives. This approach, also used by the TensorFlow library, frees the developer from having to write algorithms by hand and provides pieces that can be reused across different projects.
One key motivation for why machine learning projects might be worth creating in Go was raised by Gorgonia’s creator in the Hacker News thread where he was promoting the project: “Part of the reason why I wrote Gorgonia was because I spent waay [sic] too long trying to deploy Theano on the cloud (this was circa 2 years ago).”
A purely Go solution means fewer pieces from different languages that would have to be packaged and deployed together. But the main advantage of having these libraries in Go isn’t deployment, but developer comfort. Prospective machine learning developers now have that many more languages to be productive in — and it means existing Go developers who want to become machine learning pros can get a leg up in a domain with which they’re already comfortable.
IDG News Service