create an svm_problem of *one* example The returned structure must be deleted with FreeProblem(). Implements Impala::Core::Training::TrainDataSrc. Definition at line 86 of file TrainDataSrcFeature.h. References Impala::Core::Feature::FeatureTable::FindFeature(), GetFeatureTableWithCache(), Impala::Core::Training::TrainDataSrc::GetQuid(), ILOG_ERROR, Impala::Core::Training::TrainDataSrc::MakeEmptyProblem(), Impala::Core::Training::SvmProblemBuilder::MakeProblem(), Impala::Core::Training::TrainDataSrc::mAnnotation, Impala::Core::Training::TrainDataSrc::mSelection, and Impala::QuidObject(). 00087 { 00088 Quid q = GetQuid(i); 00089 // note that the object of a frame quid is its video, which is a dirId 00090 int videoId = QuidObject(q); 00091 // open table (cached) and access correct line 00092 Feature::FeatureTable* table = GetFeatureTableWithCache(videoId); 00093 if (table == 0) 00094 { 00095 ILOG_ERROR("could not open features for video #" << videoId); 00096 return MakeEmptyProblem(); 00097 } 00098 VectorReal64 vector = table->FindFeature(q); 00099 // how can we check for validity of vector? 00100 SvmProblemBuilder pb(mAnnotation, mSelection); 00101 svm_problem* ret = pb.MakeProblem(&vector); 00102 return ret; 00103 }
Here is the call graph for this function:
|