Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/20 08:28:49 (4 years ago)
Author:
pfleck
Message:

#3040 Moved Alglib+AutoDiff constant optimizer in own class and created base class to provide multiple constant-opt implementations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Algorithms.DataAnalysis/3.4/NonlinearRegression/NonlinearRegression.cs

    r17180 r17472  
    263263      }
    264264
    265       if (!SymbolicRegressionConstantOptimizationEvaluator.CanOptimizeConstants(tree)) throw new ArgumentException("The optimizer does not support the specified model structure.");
     265      if (!NonlinearLeastSquaresConstantOptimizationEvaluator.CanOptimizeConstants(tree)) throw new ArgumentException("The optimizer does not support the specified model structure.");
    266266
    267267      // initialize constants randomly
     
    275275      var interpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
    276276
    277       SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, tree, problemData, problemData.TrainingIndices,
     277      tree = NonlinearLeastSquaresConstantOptimizationEvaluator.OptimizeTree(tree, problemData, problemData.TrainingIndices,
    278278        applyLinearScaling: applyLinearScaling, maxIterations: maxIterations,
    279         updateVariableWeights: false, updateConstantsInTree: true);
     279        updateVariableWeights: false);
    280280
    281281      var model = new SymbolicRegressionModel(problemData.TargetVariable, tree, (ISymbolicDataAnalysisExpressionTreeInterpreter)interpreter.Clone());
Note: See TracChangeset for help on using the changeset viewer.