如何打开扩展名为arff的文件

如题所述

第1个回答  2006-09-14
专业工具是Weka,用其“Explorer”功能可以打开它。.arff是Weka使用的数据文件。

.arff其实是一个文本数据集,格式并不复杂,用记事本打开一看就明白了。
第2个回答  推荐于2017-05-28
arff 文件格式
weka中分析对象是以arff格式文件表示的,主要有两部分组成:文件头和数据。文件头包括relation说明和属性说明。@relation weather @attribute temperature real @attribute windy {TRUE, FALSE} 属性部分声明属性名称和类别(如果为枚举型则说明预设数据值),数据部分由@data 引导。主要处理的数据类型有枚举型(nominal)数值型(integer real)、文本型(string)、日期型(date)。从本质上来讲只有nomianl 和numeric 两类,因为string 可看作特殊的nominal ,date则可以作为numeric类型处理。date本身作为String类型,当arff文件读入时自动转换为date,其中每一部分(年月日等)可作为整型处理。

weather表对应的arff文件如下:

@relation weather

@attribute outlook {sunny, overcast, rainy}
@attribute temperature real
@attribute humidity real
@attribute windy {TRUE, FALSE}
@attribute play {yes, no}

@data
sunny,85,85,FALSE,no
sunny,80,90,TRUE,no
overcast,83,86,FALSE,yes
rainy,70,96,FALSE,yes
rainy,68,80,FALSE,yes
rainy,65,70,TRUE,no
overcast,64,65,TRUE,yes
sunny,72,95,FALSE,no
sunny,69,70,FALSE,yes
rainy,75,80,FALSE,yes
sunny,75,70,TRUE,yes
overcast,72,90,TRUE,yes
overcast,81,75,FALSE,yes
rainy,71,91,TRUE,no

arff格式文件的特点:a standard way of representing datasets that consist of independent,unordered instances and do not involve relationships among instances。各个记录相互独立、没有顺序要求,同时各个记录间不存在关系。
called an ARFF file.

Weka软件
http://www.baidu.com/s?ct=0&ie=gb2312&bs=arff%CE%C4%BC%FE&sr=&z=&cl=3&f=8&wd=Weka+%CF%C2%D4%D8

Weka作为数据挖掘开源项目中的经典,很多算法和数据的组织结构是值得学习的。Weka里面大量使用了一种叫做arff(Attribute-Relation File Format )的数据文件结构。这种arff文件内部结构很简单,主要是测试算法使用的轻量级的数据文件结构。OpenMiner继承Weka的风格,也打算支持arff文件格式,并且作为前期的挖掘算法测试数据来源。下面是我从网上找到的关于这种文件格式的网址http://www.cs.waikato.ac.nz/~ml/weka/arff.html ARFF文件格式很简单,从Weka里面都可以找到一些它的例子: @relation weather @attribute outlook {sunny, overcast, rainy}@attribute temperature real@attribute humidity real@attribute windy {TRUE, FALSE}@attribute play {yes, no} @datasunny,85,85,FALSE,nosunny,80,90,T本回答被网友采纳