Commit a60188bb authored by Davis King's avatar Davis King

The stopping condition for the svr_linear_trainer was too tight when

there were a lot of samples, causing it to take an excessive amount
of time to converge in some cases.  This fixes it.
parent 9ea4558e
...@@ -72,6 +72,8 @@ namespace dlib ...@@ -72,6 +72,8 @@ namespace dlib
unsigned long num_iterations unsigned long num_iterations
) const ) const
{ {
current_risk_value /= samples.size();
current_risk_gap /= samples.size();
if (be_verbose) if (be_verbose)
{ {
using namespace std; using namespace std;
......
...@@ -65,6 +65,7 @@ namespace ...@@ -65,6 +65,7 @@ namespace
samples[i] = ekm.project(samples[i]); samples[i] = ekm.project(samples[i]);
svr_linear_trainer<linear_kernel<sample_type> > linear_trainer; svr_linear_trainer<linear_kernel<sample_type> > linear_trainer;
linear_trainer.set_epsilon(0.0001);
linear_trainer.set_c(30); linear_trainer.set_c(30);
linear_trainer.set_epsilon_insensitivity(0.001); linear_trainer.set_epsilon_insensitivity(0.001);
......
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