Weka简介 您所在的位置:网站首页 weka界面介绍 Weka简介

Weka简介

2023-09-08 01:52| 来源: 网络整理| 查看: 265

简介

Weka的全名是怀卡托智能分析环境(Waikato Environment for Knowledge Analysis),是一款免费的,非商业化(与之对应的是SPSS公司商业数据挖掘产品–Clementine )的,基于JAVA环境下开源的机器学习(machine learning)以及数据挖掘(data minining)软件。它和它的源代码可在其官方网站下载。有趣的是,该软件的缩写WEKA也是New Zealand独有的一种鸟名,而Weka的主要开发者同时恰好来自New Zealand的the University of Waikato。

数据格式

Weka中自带的鸢尾花数据集:

% 1. Title: Iris Plants Database % % 2. Sources: % (a) Creator: R.A. Fisher % (b) Donor: Michael Marshall (MARSHALL%[email protected]) % (c) Date: July, 1988 % % 3. Past Usage: % - Publications: too many to mention!!! Here are a few. % 1. Fisher,R.A. "The use of multiple measurements in taxonomic problems" % Annual Eugenics, 7, Part II, 179-188 (1936); also in "Contributions % to Mathematical Statistics" (John Wiley, NY, 1950). % 2. Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis. % (Q327.D83) John Wiley & Sons. ISBN 0-471-22361-1. See page 218. % 3. Dasarathy, B.V. (1980) "Nosing Around the Neighborhood: A New System % Structure and Classification Rule for Recognition in Partially Exposed % Environments". IEEE Transactions on Pattern Analysis and Machine % Intelligence, Vol. PAMI-2, No. 1, 67-71. % -- Results: % -- very low misclassification rates (0% for the setosa class) % 4. Gates, G.W. (1972) "The Reduced Nearest Neighbor Rule". IEEE % Transactions on Information Theory, May 1972, 431-433. % -- Results: % -- very low misclassification rates again % 5. See also: 1988 MLC Proceedings, 54-64. Cheeseman et al's AUTOCLASS II % conceptual clustering system finds 3 classes in the data. % % 4. Relevant Information: % --- This is perhaps the best known database to be found in the pattern % recognition literature. Fisher's paper is a classic in the field % and is referenced frequently to this day. (See Duda & Hart, for % example.) The data set contains 3 classes of 50 instances each, % where each class refers to a type of iris plant. One class is % linearly separable from the other 2; the latter are NOT linearly % separable from each other. % --- Predicted attribute: class of iris plant. % --- This is an exceedingly simple domain. % % 5. Number of Instances: 150 (50 in each of three classes) % % 6. Number of Attributes: 4 numeric, predictive attributes and the class % % 7. Attribute Information: % 1. sepal length in cm % 2. sepal width in cm % 3. petal length in cm % 4. petal width in cm % 5. class: % -- Iris Setosa % -- Iris Versicolour % -- Iris Virginica % % 8. Missing Attribute Values: None % % Summary Statistics: % Min Max Mean SD Class Correlation % sepal length: 4.3 7.9 5.84 0.83 0.7826 % sepal width: 2.0 4.4 3.05 0.43 -0.4194 % petal length: 1.0 6.9 3.76 1.76 0.9490 (high!) % petal width: 0.1 2.5 1.20 0.76 0.9565 (high!) % % 9. Class Distribution: 33.3% for each of 3 classes. @RELATION iris @ATTRIBUTE sepallength REAL @ATTRIBUTE sepalwidth REAL @ATTRIBUTE petallength REAL @ATTRIBUTE petalwidth REAL @ATTRIBUTE class {Iris-setosa,Iris-versicolor,Iris-virginica} @DATA 5.1,3.5,1.4,0.2,Iris-setosa 4.9,3.0,1.4,0.2,Iris-setosa 6.1,2.8,4.7,1.2,Iris-versicolor 5.4,3.0,4.5,1.5,Iris-versicolor 6.0,3.4,4.5,1.6,Iris-versicolor 5.1,2.5,3.0,1.1,Iris-versicolor 5.7,2.8,4.1,1.3,Iris-versicolor 6.3,2.5,5.0,1.9,Iris-virginica 6.5,3.0,5.2,2.0,Iris-virginica 6.2,3.4,5.4,2.3,Iris-virginica 5.9,3.0,5.1,1.8,Iris-virginica % % %

上面数据集只是部分。 WEKA存储数据的格式是ARFF(Attribute-Relation File Format)文件,这是一种ASCII文本文件。在WEKA安装目录的“data”子目录下可以找到:iris.arff

识别ARFF文件的重要依据是分行,因此不能在这种文件里随意的断行。空行(或全是空格的行)将被忽略。 以“%”开始的行是注释,WEKA将忽略这些行。如果你看到的“iris.arff”文件多了或少了些“%”开始的行,是没有影响的。 除去注释后,整个ARFF文件可以分为两个部分。第一部分给出了头信息(Head information),包括了对关系的声明和对属性的声明。第二部分给出了数据信息(Data information),即数据集中给出的数据。从“@data”标记开始,后面的就是数据信息了。

关系声明

关系名称在ARFF文件的第一个有效行来定义,格式为 @relation 是一个字符串。如果这个字符串包含空格,它必须加上引号(指英文标点的单引号或双引号)。

属性声明

属性声明用一列以“@attribute”开头的语句表示。数据集中的每一个属性都有它对应的“@attribute”语句,来定义它的属性名称和数据类型。其语句定义的顺序对应数据中属性的顺序。 属性声明的格式为 @attribute 其中: 是必须以字母开头的字符串。和关系名称一样,如果这个字符串包含空格,它必须加上引号。 WEKA支持的 有四种,分别是 numeric ————————-数值型 —–分类(nominal)型 string —————————-字符串型 date[] ——–日期和时间型 其中 和 将在下面说明。还可以使用两个类型“integer”和“real”,但是WEKA把它们都当作“numeric”看待。注意“integer”,“real”,“numeric”,“date”,“string”这些关键字是区分大小写的,而“relation”“attribute ”和“date”则不区分。

分类属性

分类属性由 列出一系列可能的类别名称并放在花括号中: {,,,...} 。数据集中该属性的值只能是其中一种类别。 例如:如下的属性声明说明“outlook”属性有三种类别:“sunny”,“ overcast”和“rainy”。而数据集中每个实例对应的“outlook”值必是这三者之一。 @attribute outlook {sunny, overcast, rainy} 如果类别名称带有空格,仍需要将之放入引号中。

字符串属性

字符串属性中可以包含任意的文本。这种类型的属性在文本挖掘中非常有用。 示例: @attributeLCCstring

日期和时间属性

日期和时间属性统一用“date”类型表示,它的格式是 @attributedate[] 其中 是这个属性的名称,



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有