=> 🏡 Home | Back to gemlog

Using Weka in Go

Posted on 01 May 2015

A couple of years ago I wrote a blog post [1] about wrapping some of Weka [2]'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.

=> 1
=> 2

I began development in Go [3] 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 [4], and while Go machine-learning toolkits do exist [5], I wanted to use my existing models that were serialized in Java by Weka.

=> 3 | 4 | 5

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

=> 6 | 7

model := wekago.NewModel("bayes.BayesNet")
...
model.AddTrainingInstance(train_instance1)
...
model.Train()
model.AddTestingInstance(train_instance1)
...
model.Test()

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

=> 8

=> Reply via email | Back to gemlog

Proxy Information
Original URL
gemini://wilw.capsule.town/log/2015-05-01-using-weka-in-go.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
175.842519 milliseconds
Gemini-to-HTML Time
1.806035 milliseconds

This content has been proxied by September (3851b).