(Weka4P) Weka Machine Learning for Processing

We present Weka4P, an open-sourced machine learning library with APIs that support designers to use Weka’s machine-learning functionality with Processing. It attempts to provide an interface for the designers to use and make sense of machine learning (ML) behaviors with Processing languages, so they will be able to use ML correctly as design materials in their process.


Machine learning (ML) is now a fairly established technology that is ready for design innovation. Therefore, designers appear regularly to integrate ML in smart products and services. Nonetheless, the ``black box’’ behavior of machine learning impedes the designers from understanding the capabilities and limitations of ML, so the designers usually overlook the critical practice concerns in their concept.

We present a machine learning library, namely Weka4P, which is based on Processing — a programming language that is broadly used in the design and education community. Weka4P is a layer of abstraction that is based on the Weka library. We provide an easy-to-use application programming interface (API) with handy examples for designers to perform data collection and model training as well as use and evaluate the model with rich visuals and interactivity, which could support the users to make sense of the ML behaviors in an embodied manner.

A user of Weka4P can train and use an ML model in the following workflow:

Weka4P provides ease of prototyping, rich visuals, and interactivity. The users can use Arduino and Processing for prototyping interactive systems with the example codes. The tool provides visually rich information that guides the users to make sense of the behavior and performance of an ML algorithm. The rich interactivity that has been substantially enabled and extensively documented by the existing Arduino and Processing community can also support the designers in designing rich tangible and embodied interactions.


Download (Weka4P) Weka Machine Learning for Processing version 0.1.0 in .zip format. Last update, 06/25/2021.


Unzip and put the extracted Weka4P folder into the libraries folder of your Processing sketches. Reference and examples are included in the Weka4P folder.

Possible Conflicts

Please do uninstall/remove any weka.jar from your libraries folder or code folder (in projects) when using this library. There are possible conflicts that can occur.


Machine Learning, Weka, Data, classification, regression, neural networks


Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.


The source code of (Weka4P) Weka Machine Learning for Processing is available at GitHub, and its repository can be browsed here.


Platform osx,windows
Processing 3.5.4
Dependencies Weka, mtj, arpack_combined_all, papaya, core-netlib