Skip to content

Commit

Permalink
if max_train_time == 0 - disable time limit for ocas
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Mar 9, 2012
1 parent c25cd07 commit 0d72eb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/shogun/classifier/svm/SVMOcas.cpp
Expand Up @@ -330,7 +330,6 @@ void CSVMOcas::compute_W(

void CSVMOcas::init()
{
max_train_time=1000000;
use_bias=true;
bufsize=3000;
C1=1;
Expand Down
5 changes: 4 additions & 1 deletion src/shogun/classifier/svm/libocas.cpp
Expand Up @@ -898,7 +898,10 @@ ocas_return_value_T svm_ocas_solver_difC(
if( ocas.Q_P - ocas.Q_D <= TolRel*LIBOCAS_ABS(ocas.Q_P)) ocas.exitflag = 1;
if( ocas.Q_P - ocas.Q_D <= TolAbs) ocas.exitflag = 2;
if( ocas.Q_P <= QPBound) ocas.exitflag = 3;
if( ocas.ocas_time >= MaxTime) ocas.exitflag = 4;
if (MaxTime>0)
{
if( ocas.ocas_time >= MaxTime) ocas.exitflag = 4;
}
if(ocas.nCutPlanes >= BufSize) ocas.exitflag = -1;

} /* end of the main loop */
Expand Down

0 comments on commit 0d72eb6

Please sign in to comment.