Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/22 11:09:29 (2 years ago)
Author:
mkommend
Message:

#3136: Fixed bug in paramter optimization code of NMSE evaluator (tree has never been updated).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs

    r18179 r18183  
    254254          lowerEstimationLimit,
    255255          upperEstimationLimit);
    256 
    257256      else if (applyLinearScaling) // extra scaling terms, which are included in tree
    258257        CalcLinearScalingTerms(tree, problemData, rows, interpreter);
     
    342341      counter.GradientEvaluations += rowEvaluationsCounter.GradientEvaluations / n;
    343342
    344       // * TerminationType, completetion code:
     343      // * TerminationType, completion code:
    345344      //     * -8    optimizer detected NAN/INF values either in the function itself,
    346345      //             or in its Jacobian
     
    356355      //             X contains point which was "current accepted" when termination
    357356      //             request was submitted.
    358       if (rep.terminationtype < 0) {
     357      if (rep.terminationtype > 0) {
    359358        UpdateParameters(tree, c, updateVariableWeights);
    360359      }
     
    399398      return (double[] c, double[] resid, object o) => {
    400399        for (int i = 0; i < y.Length; i++) {
    401           Buffer.BlockCopy(x, i * d * sizeof(double), xi, 0, d*sizeof(double)); // copy row. We are using BlockCopy instead of Array.Copy because x has rank 2
     400          Buffer.BlockCopy(x, i * d * sizeof(double), xi, 0, d * sizeof(double)); // copy row. We are using BlockCopy instead of Array.Copy because x has rank 2
    402401          resid[i] = func(c, xi) - y[i];
    403402        }
Note: See TracChangeset for help on using the changeset viewer.