Closed Mali-DS closed 5 years ago
Hi,
You can ignore the extra numbers if you want. It is simply the information regarding the argmax, for example. y[7] = P(Y_0 = y[0]) (where y[0] = 0 in your case; Y_0 is the 0-th label).
Hi, I know I can ignore the first 7 numbers but Actually the result of prediction is not important for me, the result of evaluation is important, which is based on this array, and because the first 7 are zero the result of evaluation zero....
The problem was in the Evaluation, it should not use the first few array entries, but the last ones. The last commit should fix that.
Hi, I am trying to call Evaluation from the last version of Meka like this:
Result result = Evaluation.evaluateModel(classifier, testInstances, top, vop);
Finally I found this calling ends to "distributionForInstance" method in CR.class but I don't understand why this method create the array of Double with length of 2 times of class index
and put the prediction values at the end of array?
public double[] distributionForInstance(Instance x) throws Exception { int L = x.classIndex(); double[] y = new double[L * 2];
in my case I have 7 class indexes, this method creates y[14] and put the 7 prediction values at end of y, then the first 7 value in the y is zero and the result of evaluation showed zero....