arff 文件格式 |
By wjliu182 发表于 2006-7-5 17:22:35 |
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} @data arff格式文件的特点:a standard way of representing datasets that consist of independent,unordered instances and do not involve relationships among instances。各个记录相互独立、没有顺序要求,同时各个记录间不存在关系。 |