Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/13/20 22:37:36 (4 years ago)
Author:
chaider
Message:

#3076 Added parameter to use smart splitting and extended constraint checking method for splitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3076_IA_evaluators_analyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMultiSoftConstraintEvaluator.cs

    r17733 r17743  
    118118
    119119      var qualities = Calculate(interpreter, solution, estimationLimits.Lower, estimationLimits.Upper, problemData,
    120         rows, DecimalPlaces, minIntervalWidth, maxIntervalSplitDepth);
     120        rows, UseIntervalSplitting);
    121121      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    122122      return base.InstrumentedApply();
     
    132132      var quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree,
    133133        EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper,
    134         problemData, rows, DecimalPlaces, MinSplittingWidth,
    135         MaxSplittingDepth);
     134        problemData, rows, UseIntervalSplitting);
    136135
    137136      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
     
    146145                                     ISymbolicExpressionTree solution, double lowerEstimationLimit,
    147146                                     double upperEstimationLimit,
    148                                      IRegressionProblemData problemData, IEnumerable<int> rows,
    149                                      int decimalPlaces, double minIntervalSplitWidth, int maxIntervalSplitDepth) {
     147                                     IRegressionProblemData problemData, IEnumerable<int> rows, bool splitting) {
    150148      OnlineCalculatorError errorState;
    151149      var estimatedValues =
     
    166164
    167165      var objectives          = new List<double> {nmse};
    168       var intervalInterpreter = new IntervalInterpreter();
    169       /*{MinIntervalSplitWidth = minIntervalSplitWidth, MaxIntervalSplitDepth = maxIntervalSplitDetph};*/
     166      var intervalInterpreter = new IntervalInterpreter(){UseIntervalSplitting = splitting};
    170167
    171168      var constraintObjectives = new List<double>();
    172169      foreach (var c in constraints) {
    173170        var penalty = ConstraintExceeded(c, intervalInterpreter, variableRanges,
    174           solution /*, problemData.IntervalSplitting*/);
     171          solution);
    175172        var maxP = 0.1;
    176173
     
    188185    public static double ConstraintExceeded(IntervalConstraint constraint, IntervalInterpreter intervalInterpreter,
    189186                                            IReadOnlyDictionary<string, Interval> variableRanges,
    190                                             ISymbolicExpressionTree solution /*, bool splitting*/) {
     187                                            ISymbolicExpressionTree solution) {
    191188      if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable))
    192189        throw new ArgumentException(
     
    196193      if (!constraint.IsDerivative) {
    197194        resultInterval =
    198           intervalInterpreter.GetSymbolicExpressionTreeInterval(solution, variableRanges /*, splitting:splitting*/);
     195          intervalInterpreter.GetSymbolicExpressionTreeInterval(solution, variableRanges, 0);
    199196      }
    200197      else {
     
    204201
    205202        resultInterval =
    206           intervalInterpreter.GetSymbolicExpressionTreeInterval(tree, variableRanges /*, splitting: splitting*/);
     203          intervalInterpreter.GetSymbolicExpressionTreeInterval(tree, variableRanges, 0);
    207204      }
    208205     
Note: See TracChangeset for help on using the changeset viewer.