> The point is to evaluate the model with the majority class. When I put 1 for the index I got the value nan for the f-measure, and I put the index 0 I got a value.
There seems to be a confusion about "attribute index" and "label
index". Label index is the index of a label within a nominal
attribute.
"class attribute" is the attribute that you defined to be the output
variable. "class label index" is the label index within the nominal
class attribute.
f-measure knows what the class attribute is, there is no need to
specify the attribute index. What you need to specify is the class
label index that you want the measure for (and, according to the
documentation, this is a 0-based index).
I recommend you using ZeroR as base-line classifier for determining
statistics for the majority class:
http://weka.sourceforge.net/doc.dev/weka/classifiers/rules/ZeroR.html
You can just use your actual dataset with ZeroR, no need to create a fake one.