Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #607 from puffin444/master
Model Selection Parameter Name Fix.
  • Loading branch information
karlnapf committed Jun 27, 2012
2 parents 7bac16a + c34d4bd commit db17b24
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
Expand Up @@ -204,11 +204,11 @@ CModelSelectionParameters* create_param_tree_4a()
CGaussianKernel* gaussian_kernel_svm=new CGaussianKernel(10, 2);

CModelSelectionParameters* param_inf=new CModelSelectionParameters(
"Inference Method", inf);
"inference_method", inf);
root->append_child(param_inf);

CModelSelectionParameters* param_inf_gaussian=new CModelSelectionParameters(
"model", lik);
"likelihood_model", lik);
param_inf->append_child(param_inf_gaussian);

CModelSelectionParameters* param_inf_kernel_1=new CModelSelectionParameters(
Expand Down Expand Up @@ -259,11 +259,11 @@ CModelSelectionParameters* create_param_tree_4b()
param_c->build_values(1,2,R_EXP);

CModelSelectionParameters* param_inf=new CModelSelectionParameters(
"Inference Method", inf);
"inference_method", inf);
root->append_child(param_inf);

CModelSelectionParameters* param_inf_gaussian=new CModelSelectionParameters(
"model", lik);
"likelihood_model", lik);
param_inf->append_child(param_inf_gaussian);

CModelSelectionParameters* param_inf_kernel_1=new CModelSelectionParameters(
Expand Down Expand Up @@ -307,11 +307,11 @@ CModelSelectionParameters* create_param_tree_5()
mean, labels, lik);

CModelSelectionParameters* param_inf=new CModelSelectionParameters(
"Inference Method", inf);
"inference_method", inf);
root->append_child(param_inf);

CModelSelectionParameters* param_inf_gaussian=new CModelSelectionParameters(
"model", lik);
"likelihood_model", lik);
param_inf->append_child(param_inf_gaussian);

CModelSelectionParameters* param_inf_gaussian_sigma=
Expand Down
Expand Up @@ -92,17 +92,17 @@ int main(int argc, char **argv)

CModelSelectionParameters* root=new CModelSelectionParameters();

CModelSelectionParameters* c2=new CModelSelectionParameters("Inference Method", inf);
CModelSelectionParameters* c2=new CModelSelectionParameters("inference_method", inf);
root->append_child(c2);

CModelSelectionParameters* c3=new CModelSelectionParameters("Likelihood Model", lik);
CModelSelectionParameters* c3=new CModelSelectionParameters("likelihood_model", lik);
c2->append_child(c3);

CModelSelectionParameters* c1=new CModelSelectionParameters("sigma");
c3->append_child(c1);
c1->build_values(-10.0, 2.0, R_EXP);

CModelSelectionParameters* c4=new CModelSelectionParameters("Kernel", test_kernel);
CModelSelectionParameters* c4=new CModelSelectionParameters("kernel", test_kernel);
c2->append_child(c4);

CModelSelectionParameters* c5=new CModelSelectionParameters("width");
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/evaluation/GradientEvaluation.cpp
Expand Up @@ -30,7 +30,7 @@ CGradientEvaluation::CGradientEvaluation(CMachine* machine, CFeatures* features,

void CGradientEvaluation::init()
{
SG_ADD((CSGObject**)&m_diff, "Differentiable Function",
SG_ADD((CSGObject**)&m_diff, "differentiable_function",
"Differentiable Function", MS_NOT_AVAILABLE);
}

Expand Down
8 changes: 4 additions & 4 deletions src/shogun/modelselection/GradientModelSelection.cpp
Expand Up @@ -101,11 +101,11 @@ void CGradientModelSelection::init()
m_grad_tolerance = 1e-4;
m_current_combination = NULL;

SG_ADD((CSGObject**)&m_current_combination, "Current Combination",
SG_ADD((CSGObject**)&m_current_combination, "current_combination",
"Current Combination", MS_NOT_AVAILABLE);
SG_ADD(&m_grad_tolerance, "Gradient Tolerance",
"Gradient Tolerance", MS_NOT_AVAILABLE);
SG_ADD(&m_max_evaluations, "Max Evaluations", "Max Evaluations",
SG_ADD(&m_grad_tolerance, "gradient_tolerance",
"gradient_tolerance", MS_NOT_AVAILABLE);
SG_ADD(&m_max_evaluations, "max_evaluations", "Max Evaluations",
MS_NOT_AVAILABLE);
}

Expand Down
2 changes: 1 addition & 1 deletion src/shogun/modelselection/ParameterCombination.cpp
Expand Up @@ -37,7 +37,7 @@ void CParameterCombination::init()
m_child_nodes=new CDynamicObjectArray();
SG_REF(m_child_nodes);

SG_ADD((CSGObject**)&m_child_nodes, "child nodes",
SG_ADD((CSGObject**)&m_child_nodes, "child_nodes",
"children of this node", MS_NOT_AVAILABLE);
}

Expand Down
4 changes: 2 additions & 2 deletions src/shogun/regression/GaussianProcessRegression.cpp
Expand Up @@ -47,9 +47,9 @@ void CGaussianProcessRegression::init()
m_features = NULL;
m_method = NULL;

SG_ADD((CSGObject**) &m_features, "Features", "Feature object.",
SG_ADD((CSGObject**) &m_features, "features", "Feature object.",
MS_NOT_AVAILABLE);
SG_ADD((CSGObject**) &m_method, "Inference Method", "Inference Method.",
SG_ADD((CSGObject**) &m_method, "inference_method", "Inference Method.",
MS_AVAILABLE);
}

Expand Down
6 changes: 3 additions & 3 deletions src/shogun/regression/gp/InferenceMethod.cpp
Expand Up @@ -46,12 +46,12 @@ CInferenceMethod::~CInferenceMethod() {

void CInferenceMethod::init()
{
SG_ADD((CSGObject**)&m_kernel, "Kernel", "Kernel", MS_AVAILABLE);
SG_ADD((CSGObject**)&m_model, "Likelihood Model", "Likelihood model",
SG_ADD((CSGObject**)&m_kernel, "kernel", "Kernel", MS_AVAILABLE);
SG_ADD((CSGObject**)&m_model, "likelihood_model", "Likelihood model",
MS_AVAILABLE);
SG_ADD((CSGObject**)&m_labels, "labels", "Labels", MS_NOT_AVAILABLE);
SG_ADD((CSGObject**)&m_features, "features", "Features", MS_NOT_AVAILABLE);
SG_ADD((CSGObject**)&m_mean, "Mean", "Mean Function", MS_NOT_AVAILABLE);
SG_ADD((CSGObject**)&m_mean, "mean_function", "Mean Function", MS_NOT_AVAILABLE);

m_kernel = NULL;
m_model = NULL;
Expand Down

0 comments on commit db17b24

Please sign in to comment.