10int main(
int argc,
char** argv)
20 double best_value = 1e100;
21 double best_gamma = 0.0;
23 std::cout<<
"Grid search in the range [1, 10000] on log scale:"<<std::endl;
24 for (
unsigned i=0; i<=400; i++)
26 double gamma = pow(10.0, i / 100.0);
28 double f = rm.
eval(param);
35 std::cout<<
"best gamma: "<< best_gamma<<
" radius margin quotient: "<<best_value<<std::endl;
39 rprop.
init(rm, RealVector(1, 100.0), 1.0);
40 std::cout<<
"\nGradient-based optimization (IRprop+, 50 steps):"<<std::endl;
41 for (
unsigned i=0; i<50; i++) rprop.
step(rm);
43 best_value = rm.
eval(RealVector(1, best_gamma));
44 std::cout<<
"best gamma: "<< best_gamma<<
" radius margin quotient: "<<best_value<<std::endl;