weka机器学习实战_Java Weka和机器学习简介

本文介绍了Weka,一个由怀卡托大学开发的Java机器学习软件。它提供了预定义的类,包括回归和分类技术,简化了开发人员的工作。文章详细说明了如何在Eclipse IDE中添加和使用Weka.jar,以及它对CSV文件的特殊要求。
摘要由CSDN通过智能技术生成

weka机器学习实战

什么是weka,我们如何在Java机器学习中使用它? (What is weka, and how do we use it in machine learning for java?)

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.

Weka基本上是怀卡托大学开发的机器学习软件。 该软件是用Java编程语言编写的。 Weka.jar包含各种预定义的类,其中包括用于机器学习的各种回归和分类技术的类。 因此,使用weka ,Java开发人员只需创建一个他们想使用的特定机器学习类的对象。 这减少了代码长度,因为开发人员不必从头开始编写各种机器学习技术或算法。

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

不仅如此, weka还具有各种方便的功能选择预定义类。 该软件是开源的,可以免费下载。 因此,现在就让我们看看如何在您的Java项目库中包含weka.jar 。 我将使用Eclipse Helios,您可以使用Java的任何Eclipse版本。 首先,你需要下载weka.jar为这可以从这里下载: Weka.jar

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:

1)现在打开您的Eclipse IDE,并通过单击文件选项→新建→Java项目创建一个新的Java项目 ,您将看到一个对话框,如下所示:

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:

2)写下您的项目名称,然后单击下一步,单击后应会出现一个对话框,如下所示:

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:

3)在这里,单击位于库选项右侧的库选项,您将看到一个对话框,如下所示:

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:

4)在您的右边您将看到多个选项,在这里您将看到一个添加外部JAR的选项……这是从顶部第二个位置,在这里选择您从对话框链接应该下载的weka.jar文件。看起来像这样:

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.

现在,单击“完成”,您就成功地在项目中添加了weka库文件,现在您只需要在代码中导入这些类文件,以测试是否已成功添加了weka类文件 ,只需在其中创建一个新类您的项目并编写“ import weka” 。 在编写以下语句时,您将看到Eclipse IDE显示的建议列表。 这表明已经包含了weka类

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.

希望您了解weka基础知识及其在eclipse IDE中的安装 。 我们将首选使用weka进行机器学习的数据集。 是扩展名,而不是常规的.CSV扩展名。 在我即将发表的文章中,我们将探讨如何使用Eclipse IDE将.CSV转换为.arff 。 直到有美好的一天,继续学习。

翻译自: https://www.includehelp.com/ml-ai/introduction-to-weka-and-machine-learning-in-java.aspx

weka机器学习实战

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值