Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Table::BayesCondProb::CalcConceptConditionalPriorProbabilityBayesRule (  )  [inline]

Definition at line 179 of file BayesCondProb.h.

References conceptPrior, Impala::Core::Table::Bayes::DumpMatrix(), Impala::Core::Table::Bayes::DumpMatrixProb_c_gAsList(), genrePrior, Impala::Core::Table::Bayes::mConceptNum, Impala::Core::Table::Bayes::mGenreNum, Impala::Core::Table::Bayes::mProb_c_g, and mProb_g_c.

Referenced by CalcBayes().

00180     {
00181         //double** mProb_c_g = new double* [mConceptNum];
00182         //for (int k=0; k<mConceptNum; k++) mProb_c_g[k] = new double [mGenreNum];
00183 
00184         for (int k=0; k<mConceptNum; k++)
00185             memset(mProb_c_g[k],0,sizeof(double)*mGenreNum);
00186 
00187         for (int k=0; k<mConceptNum; k++)
00188         {
00189             for (int j=0; j< mGenreNum; j++)
00190             {     
00191                 // compute the conditional probability based on Bayes theorem
00192                 if (genrePrior[j] < 1e-10)
00193                     mProb_c_g[k][j] = 0;
00194                 else
00195                     mProb_c_g[k][j] = mProb_g_c[j][k] * conceptPrior[k] / genrePrior[j];
00196             }
00197         }
00198         DumpMatrix("mProb_c_g[k][j] - Bayes", mProb_c_g, mConceptNum, mGenreNum);
00199 
00200         DumpMatrixProb_c_gAsList();
00201     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:20:21 2010 for ImpalaSrc by  doxygen 1.5.1