Reimplemented from Impala::Core::Training::Evaluation. Definition at line 27 of file PrecisionAtN.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, Impala::Application::DemoCamera2d::precision, Impala::Core::Table::Table::Size(), and Impala::Core::Table::Sort(). 00028 { 00029 Sort(table, 2, false); 00030 00031 int positiveCount=0; 00032 int i; 00033 for(i=0 ; i<table->Size() && i<mN ; ++i) 00034 { 00035 Quid q = table->Get1(i); 00036 if(mAnnotation->IsPositive(q)) 00037 positiveCount++; 00038 } 00039 double precision = ((double)positiveCount)/((double)(i)); 00040 return precision; 00041 }
Here is the call graph for this function:
|