Commit b3478170 authored by Davis King's avatar Davis King

Adjusted the lambda search code so that when two lambdas give the same

leave-one-out-error we always pick the bigger lambda.  This should be
slightly better since, all other things equal, bigger lambda usually
gives better generalization.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403844
parent 6e6858bc
......@@ -414,7 +414,9 @@ namespace dlib
looe += loss(loov, y(i));
}
if (looe < best_looe)
// Keep track of the lambda which gave the lowest looe. If two lambdas
// have the same looe then pick the biggest lambda.
if (looe < best_looe || (looe == best_looe && lams(idx) > the_lambda))
{
best_looe = looe;
the_lambda = lams(idx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment