How to use crossValidate of stanford classifier?

时间:2015-06-15 14:30:31

标签: java nlp stanford-nlp

I have downloaded stanford classifier and want to do crossvalidation. It has method crossValidate so I used this code :

ColumnDataClassifier cdc = new ColumnDataClassifier("examples/iris2007.prop");
    Pair<GeneralDataset<String,String> , List<String[]>> cv = cdc.readTestExamples("examples/iris.train");
    Pair<Double, Double> result = cdc.crossValidate(cv.first(), cv.second());

but it report 0.00 for both accuracy and macro F . Am I missing something from my code to work fine?

0 个答案:

没有答案