Definition at line 102 of file TrainDataSrc.h. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), ILOG_INFO, ILOG_WARN, Impala::Core::Table::AnnotationTable::IsPositive(), MakeFolds(), mAnnotation, mSelection, Impala::Core::Table::Select(), Impala::Core::Table::Table::Size(), and Impala::Core::Table::Sort(). Referenced by Impala::Core::Training::ClassifierEvaluator::Evaluate(). 00104 { 00105 std::vector<Table::QuidTable*> folds = 00106 MakeFolds(f, foldCount, repetition, episodeConstrained); 00107 for(int i=0 ; i<folds.size() ; ++i) 00108 { 00109 if(f == i) 00110 mSelection = folds[f]; 00111 else 00112 delete folds[i]; 00113 } 00114 00115 if (restrictSet != -1) 00116 { 00117 int oldSize = mSelection->Size(); 00118 Table::QuidTable* tmp = 0; 00119 Table::CriterionQuidSetEquals<Table::QuidTable> crit(restrictSet); 00120 tmp = Select(mSelection, crit); 00121 bool hasPositive = false; 00122 for (int i=0 ; i<tmp->Size() ; i++) 00123 { 00124 if (mAnnotation->IsPositive(tmp->Get1(i))) 00125 { 00126 hasPositive = true; 00127 break; 00128 } 00129 } 00130 if (hasPositive) 00131 { 00132 delete mSelection; 00133 mSelection = tmp; 00134 ILOG_INFO("FilterTestFold: restrictSetId: size from " << oldSize 00135 << " to " << mSelection->Size()); 00136 } 00137 else 00138 { 00139 ILOG_WARN("FilterTestFold: restrict would eliminiate positives"); 00140 delete tmp; 00141 } 00142 } 00143 00144 // I'm actually not sure whether a sort here makes sense: 00145 // - on the one hand it makes TrainDataSrc more uniform and easier to debug 00146 // - on the other hand it is unnessecary and a bit slower 00147 // Let's stick with debuggability for now 00148 Sort(mSelection, 1, true); 00149 }
Here is the call graph for this function:
|