Definition at line 111 of file ActiveLearnEngineQuids.h. References Impala::Util::Database::GetFilePath(), GetID(), Impala::Util::Database::GetIOBuffer(), Impala::Core::Table::AnnotationTable::GetNrNegative(), Impala::Core::Table::AnnotationTable::GetNrPositive(), ILOG_DEBUG, ILOG_WARN, mALDatabase, mAnnotations, mInfoSent, Impala::QUID_CLASS_FRAME, Impala::QuidClassToString(), and Impala::Util::Write(). Referenced by Impala::Application::ConceptLearnClient::DoActiveLearning(). 00112 { 00113 if (mInfoSent) 00114 return; 00115 00116 if (mAnnotations->GetNrPositive() == 0) 00117 { 00118 ILOG_WARN("No positive examples, ALE request not submitted."); 00119 return; 00120 } 00121 00122 if (mAnnotations->GetNrNegative() == 0) 00123 { 00124 ILOG_WARN("No negative examples and random selection disabled, ALE request not submitted."); 00125 return; 00126 } 00127 00128 ILOG_DEBUG("Using table with " << mAnnotations->GetNrPositive() << " positive shots and " << mAnnotations->GetNrNegative() << " negative shots."); 00129 00130 String dir = "Annotations/" + QuidClassToString(QUID_CLASS_FRAME) + "/" + "conceptsActiveLearn.txt"; 00131 String filename = mALDatabase->GetFilePath(dir, GetID() + ".tab", true, false); 00132 00133 ILOG_DEBUG("Writing to " << filename << "..."); 00134 00135 Core::Table::Write(mAnnotations, filename, mALDatabase, true); 00136 00137 ILOG_DEBUG("Signalling active learning engine..."); 00138 00139 String startlearnfile = mALDatabase->GetFilePath(dir, "startlearner.txt", true, false); 00140 00141 Util::IOBuffer *slf = mALDatabase->GetIOBuffer( 00142 startlearnfile, false, false, "tmp"); 00143 if (!slf) 00144 { 00145 ILOG_WARN("No startlearnfile, ALE request not submitted."); 00146 return; 00147 } 00148 slf->IOBuffer::Puts(GetID()); 00149 delete slf; 00150 00151 ILOG_DEBUG("Signal sent."); 00152 mInfoSent = true; 00153 }
Here is the call graph for this function: ![]()
|