Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Training::Svm::SaveModel ( const std::string &  name,
Util::Database db 
) [inline, virtual]

Implements Impala::Core::Training::Classifier.

Definition at line 264 of file Svm.h.

References Impala::Util::FileCopyLocalToRemote(), Impala::FileNameTmp(), Impala::Util::Database::GetDataChannel(), ILOG_ERROR, mModel, and svm_save_model().

Referenced by Impala::Application::LearnConceptFromAnnotations(), and Impala::Core::Training::TesterIOHelper::WriteModel().

00265     {
00266         if (db->GetDataChannel())
00267         {
00268             std::string tmpName = FileNameTmp();
00269             if(svm_save_model(tmpName.c_str(), mModel) == -1)
00270                 ILOG_ERROR("[SaveModel] unable to save " << name);
00271             Util::FileCopyLocalToRemote(tmpName, name);
00272             unlink(tmpName.c_str());
00273         }
00274         else
00275         {
00276             if(svm_save_model(name.c_str(), mModel) == -1)
00277                 ILOG_ERROR("[Svm::SaveModel] unable to save " << name);
00278         }
00279     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:24:02 2010 for ImpalaSrc by  doxygen 1.5.1