Skip to content

Commit

Permalink
Obtain kernel and features after loading in cmdline interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed May 30, 2013
1 parent b6336c9 commit 3841ef9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/shogun/ui/SGInterface.cpp
Expand Up @@ -4721,12 +4721,19 @@ bool CSGInterface::cmd_load_classifier()

bool success=ui_classifier->load(filename, type);

if (dynamic_cast<CKernelMachine*>(ui_classifier->get_classifier()))
{
CKernelMachine* kernel_machine = dynamic_cast<CKernelMachine*>(ui_classifier->get_classifier());
ui_features->set_train_features(kernel_machine->get_kernel()->get_lhs());
ui_features->set_test_features(kernel_machine->get_kernel()->get_rhs());
ui_kernel->set_kernel(kernel_machine->get_kernel());
}

SG_FREE(filename);
SG_FREE(type);
return success;
}


bool CSGInterface::cmd_get_num_svms()
{
if (m_nrhs!=1 || !create_return_values(1))
Expand Down

0 comments on commit 3841ef9

Please sign in to comment.