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

virtual double Impala::Core::Training::RecallAtN::Compute ( Table::ScoreTable table  )  [inline, virtual]

Reimplemented from Impala::Core::Training::Evaluation.

Definition at line 33 of file RecallAtN.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::AnnotationTable::IsPositive(), Impala::Core::Training::Evaluation::mAnnotation, mN, mTotalRelevance, Impala::Core::Table::Table::Size(), and Impala::Core::Table::Sort().

00034     {
00035         Sort(table, 2, false);
00036 
00037         int positiveCount = 0;
00038         for (int i=0 ; i<table->Size() && i<mN ; i++)
00039         {
00040             Quid q = table->Get1(i);
00041             if (mAnnotation->IsPositive(q))
00042                 positiveCount++;
00043         }
00044         double recall = ((double)positiveCount)/((double)mTotalRelevance);
00045         return recall;
00046     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:19 2011 for ImpalaSrc by  doxygen 1.5.1