Skip main navigation

Do it yourself!

Peter Reutemann explains how to set up Python with Weka.

To set up Python with Weka you first need to install Python, and then install the python-weka-wrapper library for Python. You will probably need admin access to your computer for this.

You must ensure that your Python and Java versions have the same bitness, i.e. either 32 or 64 bits.

Java underwent dramatic changes under the hood, starting with Java 9. If you experience any issues, use Java 8 with python-weka-wrapper – it’s known to work on all platforms.

  • Download and install Python 3.x (installation is easy on Linux, but can be challenging on Windows and OSX)
  • Download and install the python-weka-wrapper3 library
  • Here are instructions for all this

Data files:

Evaluate a classifier and output summary statistics and a confusion matrix:

Plot the errors made by LinearRegression:

Display multiple ROC curves, one for each class:

This article is from the free online

Advanced Data Mining with Weka

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now