Skip to content

Commit

Permalink
example registration of member with base class type in tags
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Feb 13, 2018
1 parent 431e56b commit 3ba681c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/shogun/machine/DistanceMachine.cpp
Expand Up @@ -36,6 +36,7 @@ void CDistanceMachine::init()

distance=NULL;
m_parameters->add((CSGObject**)&distance, "distance", "Distance to use");
watch_param("distance", &distance, AnyParameterProperties("Distance to use"));
}

void CDistanceMachine::distances_lhs(SGVector<float64_t>& result, index_t idx_a1, index_t idx_a2, index_t idx_b)
Expand Down
5 changes: 4 additions & 1 deletion src/shogun/machine/KernelMachine.cpp
Expand Up @@ -634,7 +634,10 @@ void CKernelMachine::init()
use_linadd=true;
use_bias=true;

SG_ADD((CSGObject**) &kernel, "kernel", "", MS_AVAILABLE);
// SG_ADD((CSGObject**) &kernel, "kernel", "", MS_AVAILABLE);
m_parameters->add((CSGObject**) &kernel, "kernel", "");
watch_param("kernel", &kernel, AnyParameterProperties(""));

SG_ADD((CSGObject**) &m_custom_kernel, "custom_kernel", "Custom kernel for"
" data lock", MS_NOT_AVAILABLE);
SG_ADD((CSGObject**) &m_kernel_backup, "kernel_backup",
Expand Down

0 comments on commit 3ba681c

Please sign in to comment.