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