0

我在 weka-> 中有一个关于 Sparse Arff 的查询

示例如下所示:

@RELATION example

@ATTRIBUTE an apple
@ATTRIBUTE a cat
@ATTRIBUTE for love
@ATTRIBUTE the end

@ATTRIBUTE class {real, fake}

@DATA

Here is my query:
This is very straightforward->
0,1,0,0,real -> {1 1, 4 real}
0,0,0,1,fake -> {3 1, 4 fake}
But how to write this ones->
1,1,1,1,real -> ? I need help here
2,1,3,1,fake -> ? I need help here

提前谢谢各位。

最好的问候等离子33

4

1 回答 1

0

您可以运行 NonSparseToSparse 过滤器并检查结果。在您的情况下,来自:

@RELATION example

@ATTRIBUTE an numeric
@ATTRIBUTE a numeric
@ATTRIBUTE for numeric
@ATTRIBUTE the numeric

@ATTRIBUTE class {real, fake}

@DATA
0,1,0,0,real
0,0,0,1,fake
1,1,1,1,real
2,1,3,1,fake

你得到:

@relation example-weka.filters.unsupervised.instance.NonSparseToSparse

@attribute an numeric
@attribute a numeric
@attribute for numeric
@attribute the numeric
@attribute class {real,fake}

@data
{1 1}
{3 1,4 fake}
{0 1,1 1,2 1,3 1}
{0 2,1 1,2 3,3 1,4 fake}

请注意,这real是默认值,在名义属性中,它不是以稀疏格式打印的。另请注意,第一个索引是0.

于 2014-03-21T11:03:38.067 回答