Definition at line 76 of file BayesCondProb.h. References genrePrior, Impala::Core::Table::AnnotationTable::GetLabel(), Impala::Core::Table::Bayes::mAnnoTableSize, Impala::Core::Table::Bayes::mGenreNum, and Impala::Core::Table::Bayes::tabGenre. Referenced by CalcBayes(). 00077 { 00078 if (mAnnoTableSize == 0) 00079 { 00080 std::cout << "The table size is zero: NOT acceptable" <<std::endl; 00081 for (int j=0 ; j < mGenreNum ; j++) 00082 genrePrior[j] = 0; 00083 return; 00084 } 00085 std::cout<<std::endl<<"Genre Prior Probability:" <<std::endl <<std::endl; 00086 00087 // loop for all video genres 00088 for (int j=0 ; j < mGenreNum ; j++) 00089 { 00090 //int tabSize = tabGenre[j]->Capacity(); 00091 int posNum = tabGenre[j]->GetNrPositive(); 00092 String strGenre = tabGenre[j]->GetLabel(); 00093 00094 genrePrior[j] = posNum*1.0/mAnnoTableSize; 00095 std::cout << genrePrior[j] << " Pos=" << posNum << " [g" << j << " " << strGenre << "]"<< std::endl; 00096 00097 } 00098 }
Here is the call graph for this function:
|