Open In App

How To Use Classification Machine Learning Algorithms in Weka ?

Improve
Improve
Like Article
Like
Save
Share
Report

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.

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)


Last Updated : 08 May, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads