

Show HN: GoLearn - sjwhitworth
https://www.github.com/sjwhitworth/golearn

======
micro_cam
Great work! This looks to have come a long ways since I last looked at it!

Do you have benchmarks?

I've been working on a similar project just for decision tree learning [1].
I've been able to get performance just about equal to scikit learn which is
the current fastest open implementation [2]. I can beat it in some cases with
lots of binary features.

I'll see about including a compatibility layer for integration with golearn.
I'm actually also currently squatting the golearn github org but will pass it
off if you are interested.

[1]
[https://github.com/ryanbressler/CloudForest](https://github.com/ryanbressler/CloudForest)

[2] based on benchmarks here
[http://orbi.ulg.ac.be/handle/2268/170309](http://orbi.ulg.ac.be/handle/2268/170309)

[3] [https://github.com/golearn](https://github.com/golearn)

~~~
struct
(Disclaimer: I'm one of the authors).

For decision trees, the only thing that's available at the moment is a half-
baked ID3 algorithm, but I've been looking at CloudForest and it's a very
impressive piece of work.

Performance isn't very good yet: this is due to some data representation
decisions, but it now supports grouping attributes which will allow us to
optimise to acceptable performance levels (I have a prototype KNN version
which achieved similar performance levels to this guy's Rust[1]
implementation).

[1] [http://huonw.github.io/2014/06/10/knn-
rust.html](http://huonw.github.io/2014/06/10/knn-rust.html)

------
sjwhitworth
Hey guys. We've made a lot of progress since this was last posted on HN.
Please clone, play around, and give us your feedback.

Stephen (one of the authors)

------
shiloa
Very cool - solid library all the way.

As an aside, I keep hoping Google (or others) open sources a bunch of their
internal Go libraries; I'm just gussing here, but surely they've built a bunch
of tools outside the standard library to match scientific, numeric and utility
libraries found in other languages (scipy, numpy, PIL, etc)? Based on its
rumored wide adoption and extensive use inside the company, it sure makes
sense they've extended the core to suit their irregular needs.

Can anyone who's worked/works with Go at Google shed some light on this? Just
curious.

~~~
micro_cam
Not a googler but I don't think they are using it extensively for scientific
computing internally. The devs seem to be pushing it more towards server and
systems development.

IE The GC thread I linked in another comment [1] makes it pretty clear that
they may actually break the ability to easily call existing scientific
libraries (ie by handing a pointer to a go []float64 to cgo) in favor of
better real-time guarantees.

[1] [https://groups.google.com/forum/#!topic/golang-
dev/pIuOcqAlv...](https://groups.google.com/forum/#!topic/golang-
dev/pIuOcqAlvKU)

------
jbarrow
This looks like a solid package and I look forward to testing it!

I've looked into writing my own machine learning code in Go, and the major
difficulty that I've always run into was the lack of a good matrix package.
The author of GoLearn apparently uses library that wraps a Go implementation
BLAS. I'm curious to see what kind of performance this offers versus more
established linear algebra packs from other languages.

~~~
micro_cam
The gonum library has swappable backends so you can use a tuned BLAS in place
of the pure go one. (Not sure if that is what golearn uses?)

However changes to the gc and cgo may break this in the future. See comments
from gonum author Brendan Tracy here:
[https://groups.google.com/forum/#!topic/golang-
dev/pIuOcqAlv...](https://groups.google.com/forum/#!topic/golang-
dev/pIuOcqAlvKU)

------
qmaxquique
I just created a GoLearn Terminal.com snapshot. You can play with it without
having to install or compile anything.
[https://terminal.com/tiny/QLlicfE27O](https://terminal.com/tiny/QLlicfE27O)

------
thinxer
I'm not sure but will it be easier to build an interactive console especially
for golearn? I believe the IPython system is a boost to Python's success on
scientific computation.

