python-weka-wrapper3 release using JPype

Some of you might have come across the python-weka-wrapper3 library, which makes Weka available from Python:

When the project started out, it relied on the javabridge library in order to communicate with Java Virtual Machine running the Weka process. Unfortunately, that project hasn't been maintained properly for a while now and it made installation difficult or even impossible for M1/M2 Mac (ARM) users.

Over the last few weeks, I migrated the code base to using the JPype library and updated the documentation accordingly.

Since the code-based appeared stable (tests and examples worked), I made a new release on Friday last week: 0.3.0

There are several good news: first, the installation is much easier; second, ARM Mac users can use it now as well; third, there were pretty much no interface changes necessary, as all changes happened behind the scenes (only low-level access to Java objects changed).

So, if you had problems in the past, you might want to give it a go again.

Weka Debian packages

Users installing Weka on Linux must have always felt left out a bit, with no installer available, instead having to deal with just a ZIP file. For power users, that would not have mattered, but users new to Linux may have found that a bit more challenging.

Well, things have changed - at least for users of Debian or one of its many derivatives like Ubuntu - with the advent of snapshots being available for download as Debian packages (stable 3.8 and developer version).

Read more…

Jupyter notebooks

Jupyter notebooks are extremely popular in the Python world, simply because it is great to combine documentation and code in a visually appealing way. Makes it an ideal tool for teaching!

A recent post on the MOA blog, demonstrated the IJava kernel for executing Java scripts. The kernel relies on the Java JDK 9+ feature called JShell, which allows executing Java code without compiling it first.

Rather than using, I was intrigued how easy it would be to run it on ones local machine. As it turns out, extremely easy!

Read more…

Bookmarks support

One long-standing annoyance in Weka's user interface was the opening and saving of files: you needed to click many times before you reached your destination. The only thing you were able to modify, for example for the Explorer, was the initial directory a file chooser was using (Explorer.props).

However, your datasets are usually distributed, especially when you are working on many projects, which renders a single starting directory ineffective, unfortunately.

Read more…

Micro averages in multi-class classification

When evaluating multi-class classification models, Weka outputs a weighted average of the per-class precision, recall, and F-measure: it computes these statistics for each class individually, treating the corresponding class as the "positive" class and the union of the other classes as the negative class, and computes a weighted average of these per-class statistics, with a per-class weight that is equal to the proportion of data in that class. A recent question on the Weka mailing list was whether the software also outputs micro-averaged precision, recall, and F-measure for multi-class problems. It turns out that it does! To find out where these can be found, read on.

Read more…