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

double Impala::Core::Training::AveragePrecision::ComputeSub ( Table::AnnotationTableBaseType table  )  [inline, private]

Definition at line 41 of file AveragePrecision.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, Impala::Application::DemoCamera2d::precision, and Impala::Core::Table::Table::Size().

Referenced by Compute(), and ComputeReversed().

00042     {
00043         double ap=0;
00044         int positiveCount=0;
00045         for(int i=0 ; i<table->Size() ; i++)
00046         {
00047             Quid q = table->Get1(i);
00048             if(mAnnotation->IsPositive(q))
00049             {
00050                 positiveCount++;
00051                 double precision = ((double)positiveCount)/((double)(i+1));
00052                 ap += precision;
00053             }
00054         }
00055         if(positiveCount > 0)
00056             ap /= (double)positiveCount;
00057         return ap;
00058     }

Here is the call graph for this function:


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