You can run the NonSparseToSparse filter and check the results. In your case, from:
@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
You get:
@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}
Please note that real
is the default value and in nominal attributes, it is not print in sparse format. Please note as well that the first index is 0
.