Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15390


Ignore:
Timestamp:
09/29/17 16:46:24 (7 years ago)
Author:
bburlacu
Message:

#1666: Fix bug in the OptimizeConstants method of the InteractiveSymbolicRegressionSolutionSimplifierView where the same tree was returned instead of the clone with the optimized constants. Renamed regressionModelModel variable to regressionModel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r15371 r15390  
    4646    protected override ISymbolicExpressionTree OptimizeConstants(ISymbolicDataAnalysisModel model, IDataAnalysisProblemData problemData, IProgress progress) {
    4747      const int constOptIterations = 50;
    48       var regressionModelModel = (ISymbolicDataAnalysisModel)model.Clone();
     48      var regressionModel = (ISymbolicDataAnalysisModel)model.Clone();
    4949      var regressionProblemData = (IRegressionProblemData)problemData;
    50       SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(regressionModelModel.Interpreter, regressionModelModel.SymbolicExpressionTree, regressionProblemData, regressionProblemData.TrainingIndices,
    51         applyLinearScaling: true, maxIterations: constOptIterations, updateVariableWeights: true, lowerEstimationLimit: regressionModelModel.LowerEstimationLimit, upperEstimationLimit: regressionModelModel.UpperEstimationLimit,
     50      SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(regressionModel.Interpreter, regressionModel.SymbolicExpressionTree, regressionProblemData, regressionProblemData.TrainingIndices,
     51        applyLinearScaling: true, maxIterations: constOptIterations, updateVariableWeights: true, lowerEstimationLimit: regressionModel.LowerEstimationLimit, upperEstimationLimit: regressionModel.UpperEstimationLimit,
    5252        iterationCallback: (args, func, obj) => {
    5353          double newProgressValue = progress.ProgressValue + 1.0 / (constOptIterations + 2); // (maxIterations + 2) iterations are reported
    5454          progress.ProgressValue = Math.Min(newProgressValue, 1.0);
    5555        });
    56       return model.SymbolicExpressionTree;
     56      return regressionModel.SymbolicExpressionTree;
    5757    }
    5858  }
Note: See TracChangeset for help on using the changeset viewer.