Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16464 for branches


Ignore:
Timestamp:
12/28/18 17:58:52 (6 years ago)
Author:
mkommend
Message:

#2974: Adapted new constants optimizer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2974_Constants_Optimization/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/ConstantsOptimizationEvaluator.cs

    r16461 r16464  
    217217      TreeToAutoDiffTermConverter.ParametricFunction func;
    218218      TreeToAutoDiffTermConverter.ParametricFunctionGradient func_grad;
    219 
    220       if (!TreeToAutoDiffTermConverter.TryConvertToAutoDiff(tree, updateVariableWeights, applyLinearScaling, parameters, out func, out func_grad))
     219      double[] initialConstants;
     220
     221      if (!TreeToAutoDiffTermConverter.TryConvertToAutoDiff(tree, updateVariableWeights, applyLinearScaling, parameters, out func, out func_grad, out initialConstants))
    221222        throw new NotSupportedException("Could not optimize constants of symbolic expression tree due to not supported symbols used in the tree.");
    222223      if (parameters.Count == 0) return 0.0; // gkronber: constant expressions always have a R² of 0.0
    223 
    224       var initialConstants = ConstantsOptimization.Util.ExtractConstants(tree);
    225224
    226225      //extract inital constants
Note: See TracChangeset for help on using the changeset viewer.