×

Embedded Systems Tutorial

Artificial Intelligence

Machine Learning

Machine Learning with Java

ML & AI Practice

Weka Tutorial: GUI-based Machine Learning with Java

Weka: GUI-based Machine Learning with Java: In this tutorial, we will learn about Weka API, how can we use it in our eclipse IDE, and how to create a project in it? By Raunak Goswami Last updated : April 17, 2023

What is Weka?

Weka is basically a machine learning software developed by the University of Waikato. The software Is written in Java programming language. Weka.jar contains various predefined classes which include classes for various regression and classification techniques which are using in machine learning. So, using weka the java developers just have to create an object of a particular machine learning class that they want to use. This reduces the code length as the developers don’t have to code the various machine learning techniques or algorithms from the scratch.

Not only that, weka also has various predefined classes for feature selection that come in very handy. The software is open source and can be downloaded for free of cost. So, without wasting any time let us now look at how to include weka.jar in your java project library. I would be using Eclipse Helios, you can you any eclipse version for Java. First of all, you need to download weka.jar for which can be download from here: Weka.jar

How do We use Weka in Machine Learning for Java?

Creating Project

1) Now open your Eclipse ide and create a new java project by clicking on file option → new → java project and you will see a dialogue box as follows:

Machine Learning with Java 1

2) Write the name of your project and the click on next, after clicking you should get a dialog box as shown below:

Machine Learning with Java 2

3) Here, click on the libraries option located right to the libraries option you will see a dialog box a shown below:

Machine Learning with Java 3

4) At your right you will see multiple options, there you will see an option to add external JARs… which is at the second place from the top, here select the weka.jar file that you have downloaded from the link your dialog box should look like this:

Machine Learning with Java 4

Now, click on finish and you successfully added the weka library files in your project now you just have to import those class files in your code, to test that whether you have successfully added the weka class files or not, just create a new class inside your project and write "import weka". As you write the following statement you will see a list of suggestions shown by the Eclipse IDE. This indicated that the weka classes have been included.

Hope you have understood the basics of weka and its installation in eclipse IDE. The dataset that we would be preferred for machine learning using weka will have. are an extension and not the conventional.CSV extension. In my upcoming articles, we will have a look at, how we can convert .CSV to .arff using Eclipse IDE. Till then have a great day ahead and keep learning.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.