Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How To Use Classification Machine Learning Algorithms in Weka ?

  • Last Updated : 08 May, 2021

Weka tool is an open-source tool developed by students of Waikato university which stands for Waikato Environment for Knowledge Analysis having all inbuilt machine learning algorithms. It is used for solving real-life problems using data mining techniques. The tool was developed using the Java programming language so that it is platform-independent.

The tool itself contains some data sets in the data file of the application, We can them to implement our algorithms. The dataset we are going to use is breast-cancer.arff. Classification can be defined by Prediction models that predict continuous-valued functions, while classification models predict categorical class marks.

Attention reader! Don’t stop learning now. Get hold of all the important Machine Learning Concepts with the Machine Learning Foundation Course at a student-friendly price and become industry ready.



In this article, we are going to learn the classification implementation on a dataset using WEKA tool. We will use two different classifiers for this.



Part Classifier

Steps involved in this experiment are:

  • Initially, we have to load the required dataset in the weka tool using choose file option.

  • Now we have to go to the classify tab on the top left side and click on the choose button and select the part algorithm in it.

  • Now to change the parameters click on the right side at the choose button, and we are accepting the default values in this example.

  • Under the “test” options on the left side of the main panel. As our evaluation method, we choose 10-fold cross-validation. Since we don’t have a separate test data set, this is needed to get a good understanding of the model’s accuracy.

  • Now click on start to generate the classifier model. The below output will be shown:

It’s worth noting that the model’s classification accuracy is about 71%. This suggests that we will be able to find more jobs. (Either in the preprocessing or in the selection of existing classification parameters)

OneR Classifier

Steps involved in this experiment are:

  • Initially, we have to load the required dataset in the weka tool using choose file option.

  • Now we have to go to the classify tab on the top left side and click on the choose button and select the oneR algorithm in it.

  • Now to change the parameters click on the right side at the choose button, and we are accepting the default values in this example.

  • Under the “test” options on the left side of the main panel. As our evaluation method, we choose 10-fold cross-validation. Since we don’t have a separate test data set, this is needed to get a good understanding of the model’s accuracy.

  • Now click on start to generate the classifier model. Below is the output generated:

Note that the classification accuracy of the model is about 65% only. This suggests that we will be able to find more jobs. (Either in the preprocessing or in the selection of existing classification parameters)

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!