稀疏Arff Weka查询

时间:2014-03-20 11:47:44

标签: weka sparse-matrix arff

我在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

先谢谢你们。

最诚挚的问候 plasma33

1 个答案:

答案 0 :(得分: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