It's not clear from the documentation that getClassLikelihoods() and getClassDistances() aren't always ordered by label. The documentation for these functions should explain that it's necessary to call getClassLabels() to determine the labels corresponding to each element of the returned likelihood and class distance vectors.
It's not clear from the documentation that getClassLikelihoods() and getClassDistances() aren't always ordered by label. The documentation for these functions should explain that it's necessary to call getClassLabels() to determine the labels corresponding to each element of the returned likelihood and class distance vectors.