More posts

Using Weka in Go

1 May 2015 (6 years ago)🏷️ #weka🏷️ #golang🏷️ #machinelearning🏷️ #technology

🕰️ This is an old post

Please note that this article was posted quite a while ago and may now be out-of-date or inaccurate.

A couple of years ago I wrote a blog post about wrapping some of Weka's classification functionality to allow it to be used programmatically in Python programs. A small project I'm currently working on at home is around taking some of the later research from my PhD work to see if it can be expressed and used as a simple web-app.

I began development in Go as I hadn't yet spent much time working with the language. The research work involves using a Bayesian network classifier to help infer a tweet's interestingness, and while Go machine-learning toolkits do exist, I wanted to use my existing models that were serialized in Java by Weka.

I started working on WekaGo, which is able to programmatically support simple classification tasks within a Go program. It essentially just manages the model, abstracts the generation of ARFF files, and executes the necessary Java to make it quick and easy to train and classify data:

model := wekago.NewModel("bayes.BayesNet")

Results from the classification can then be examined, as described.

📲 Enjoyed this article? Subscribe to updates!

If you would like to read more posts like this, then you can subscribe via RSS.

Subscribe to an RSS feed