Skip to content

Commit

Permalink
Merge pull request #606 from puffin444/master
Browse files Browse the repository at this point in the history
Gaussian Process Example Fix.
  • Loading branch information
Soeren Sonnenburg committed Jun 27, 2012
2 parents cd63a59 + f4b4c8f commit 6e9cc41
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/undocumented/libshogun/regression_gaussian_process.cpp
Expand Up @@ -134,10 +134,14 @@ int main(int argc, char **argv)

CParameterCombination* best_combination=grad_search->select_model(true);

SG_SPRINT("best parameter(s):\n");
best_combination->print_tree();
if (best_combination)
{
SG_SPRINT("best parameter(s):\n");
best_combination->print_tree();

best_combination->apply_to_machine(gp);
}

best_combination->apply_to_machine(gp);
CGradientResult* result=(CGradientResult*)grad->evaluate();

if(result->get_result_type() != GRADIENTEVALUATION_RESULT)
Expand Down

0 comments on commit 6e9cc41

Please sign in to comment.