I have a model trained, and am using the following to return the likelihood:
UINT predictedClassLabel = bag.getPredictedClassLabel();
VectorFloat classLikelihoods = bag.getClassLikelihoods();
VectorFloat classDistances = bag.getClassDistances();
std::cout << " ClassLikelihoods: ";
for (UINT j = 0; j<classLikelihoods.size(); j++) {
std::cout << classLikelihoods[j] << " ";
}
std::cout << " ClassDistances: ";
for (UINT j = 0; j<classLikelihoods.size(); j++) {
std::cout << classDistances[j] << " ";
}
This is working great, giving me, for example:
PredictedClassLabel: 6 ClassLikelihoods: 0 0 0 0 0 1 0 0 0 0 0
ClassDistances: 0 0 0 0 0 0.390623 0 0 0 0 0
The classification is correct, But, based on the data I have given it, i would expect the distance of some other samples to be non zero also. Is it possible to return the'weights' or distance for every class, not just the classified class?
Or should this be happening already?
Thanks!
I have a model trained, and am using the following to return the likelihood:
This is working great, giving me, for example:
The classification is correct, But, based on the data I have given it, i would expect the distance of some other samples to be non zero also. Is it possible to return the'weights' or distance for every class, not just the classified class?
Or should this be happening already?
Thanks!