private String writeSparseDataEntries(VSMVector[][] examples, List<String> attributes) {
        StringBuffer sb = new StringBuffer();
        sb.append("\n");
        sb.append("\n");
        sb.append("@DATA");
        sb.append("\n");
        for (int classNumber = 0; classNumber < examples.length; classNumber++) {
            for (int i = 0; i < examples[classNumber].length; i++) {
                VSMVector example = examples[classNumber][i];
                sb.append("{");
                for (int j = 0; j < attributes.size(); j++) {
                    VSMElement feature = example.getElement(attributes.get(j));
                    if (feature != null) {
                        sb.append(j);
                        sb.append(" ");
                        sb.append((int) feature.getWeight());
                        sb.append(",");
                    }
                }
                sb.append(attributes.size());
                sb.append(" CLASS_" + classNumber + "}");
                sb.append("\n");
            }
        }
        return sb.toString();
    }
Writes ARFF data entries using the sparse format, e.g.:

<pre>
{@literal @}DATA
{1 X, 3 Y, 4 "class A"}
{2 W, 4 "class B"}
</pre>

@param examples
@param attributes
@param sb
@return
ache/src/main/java/achecrawler/target/classifier/ArffFileWriter.java