weka中的arff文件

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}
@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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值