Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9406


Ignore:
Timestamp:
04/30/13 10:54:02 (12 years ago)
Author:
gkronber
Message:

#1423: throw an exception with an error message if alglib terminates LBFGS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsMakeStep.cs

    r8401 r9406  
    7979        alglib.minlbfgs.minlbfgsreport rep = new alglib.minlbfgs.minlbfgsreport();
    8080        alglib.minlbfgs.minlbfgsresults(state.State, ref x, rep);
     81        if (rep.terminationtype < 0) {
     82          if (rep.terminationtype == -1)
     83            throw new OperatorExecutionException(this, "Incorrect parameters were specified.");
     84          else if (rep.terminationtype == -2)
     85            throw new OperatorExecutionException(this, "Rounding errors prevent further improvement.");
     86          else if (rep.terminationtype == -7)
     87            throw new OperatorExecutionException(this, "Gradient verification failed.");
     88        }
    8189        PointParameter.ActualValue = new RealVector(x);
    8290      }
Note: See TracChangeset for help on using the changeset viewer.