[MINC-development] MINC-development Digest, Vol 39, Issue 3

Daniel Garcia (MNI) dgarcia at bic.mni.mcgill.ca
Mon Mar 21 09:52:07 EDT 2011


Hi Andrew,

I was checking the rest of the code quickly but there's probably no other
place where this bug is found.
The apriori_vector is only used in bayes.cc and the
mean_veature_class_vector is used in hcm.cc and fcm.cc but it is not used to
access any vector of images.
But you're right, someone with more knowlegde on the code should check that
more carefully.

No problem, glad to help.

Later

Daniel


> Hi Daniel,
>
> Thanks for this.
>
> > I found a bug in 'classify -bayes' when including bayesian priors, the
> > classification won't work correctly but without priors it will.
> >
> > I believe I found the bug in the bayes.cc file. In line 433, I changed :
> >
> > ????????? fuzzy_bayes_vector[i] *= apriori_vector[
> > mean_feature_class_vector[i] ];
> >
> > for
> > ???? ? ?? fuzzy_bayes_vector[i] *= apriori_vector[
> > mean_feature_class_vector[i] - 1 ];
> >
> > and now it works. Items in the apriori_vector goes from 0 to (number of
> > classes -1) and the mean_feature_class_vector goes from 1 to (number of
> > classes).
>
> I'll wait until Alex and/or Louis comments on this before committing
> anything to CVS. From a quick read of bayes.cc if this is indeed a bug
> then this should modify the behavior of the classier in certain cases
> beyond your own issue. (I think).
>
> Still, I'm always keen for others to join in and correct/add code to MINC.
>
> Thanks again,
>
>
> a
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/minc-development/attachments/20110321/d120d7a8/attachment.htm>


More information about the MINC-development mailing list