CvNormalBayesClassifier - missing functionality

asked 2014-04-28 04:16:40 -0500

float CvNormalBayesClassifier::predict(const Mat& samples, Mat* results=0, Mat* results_prob=0 )

results_prob gives me the probability of each class -> how about the other potential classes? I need them as well

edit retag flag offensive close merge delete

Comments

I find your question quite weird. Naive bayes is used to create a simple binary classification. What do you means with other potential classes.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-29 04:07:44 -0500 )edit

Yes, still I need all probabilities -> P(yj|xi) but not only for the best class chosen

Amaterasu gravatar imageAmaterasu ( 2014-04-29 06:29:43 -0500 )edit

Then you will have to rewrite the class yourself. There are internal values storing the other probabilities also. This is mainly done here as a check to be sure that your output has a certain certainty level.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-29 06:44:06 -0500 )edit

Thank you for the answers! Can I inherit those values and access them? Because I want to make use of the optimization of the functionality you offer, I picture with many pixels is slow to process otherway. Can you give me a hint what those variables are? I see a few declared CvMat* var_idx; CvMat* cls_labels; CvMat** count; and more

Amaterasu gravatar imageAmaterasu ( 2014-04-29 07:04:10 -0500 )edit

I have no idea. The ML module is highly unsupported, the code still in the old C-API. I do not even come close to changing it sourcecode. So I cannot help you there.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-29 07:28:51 -0500 )edit