gpt4 book ai didi

csv - ARFF 文件的 "Data"部分可以使用空格而不是逗号吗?

转载 作者:行者123 更新时间:2023-11-30 09:23:29 25 4
gpt4 key购买 nike

我有一个大型数据集,其属性采用表格形式,如下所示

userid movieid rating

2 34 5
4 11 3

我需要将这些值输入到 ARFF 文件的数据部分,以便使用 weka 软件进行机器学习分析。但arff支持的正常格式如下

  5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
4.6,3.1,1.5,0.2,Iris-setosa

属性以逗号分隔。 arff 是否始终需要逗号,还是可以用空格或制表符分隔它?

最佳答案

数据部分的每个实例的属性值始终以逗号分隔 ( ARFF developer version ):

Each instance is represented on a single line, with carriage returns denoting the end of the instance. A percent sign (%) introduces a comment, which continues to the end of the line.

Attribute values for each instance are delimited by commas. A comma may be followed by zero or more spaces. Attribute values must appear in the order in which they were declared in the header section (i.e., the data corresponding to the nth @attribute declaration is always the nth field of the attribute).

A missing value is represented by a single question mark

在类似的情况下我发现 weka-convert (Python 命令行实用程序)非常有用。

关于csv - ARFF 文件的 "Data"部分可以使用空格而不是逗号吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23169654/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com