I was trying out the sparse representation of the arff file as shown here. In my program I am able to print the the class label "B" but for some reason it is not printing "A".
attVals = new FastVector();
attVals.addElement("A");
attVals.addElement("B");
atts.addElement(new Attribute("class", attVals));
vals[index] = attVals.indexOf("A");
The output for the program is like -
{0 6,2 8} --- I should get {0 6,2 8,3 A}
But when I do
vals[index] = attVals.indexOf("B");
I get proper output -
{0 6,2 8,3 B}
For some reason it is not taking the index 0. Can someone tell me why this is happening?