Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17538 for branches


Ignore:
Timestamp:
05/10/20 23:43:05 (4 years ago)
Author:
mkommend
Message:

#2971: Changed logic when intervals are calculated in symbolic regression solutions and simplifier.

Location:
branches/2971_named_intervals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs

    r17510 r17538  
    127127      estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
    128128      Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
    129       Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
     129
     130      if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree))
     131        Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
     132
    130133      RecalculateResults();
    131134    }
     
    176179
    177180      //Check if the tree contains unknown symbols for the interval calculation
    178       if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree) && DerivativeCalculator.IsCompatible(Model.SymbolicExpressionTree))
     181      if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree))
    179182        ModelBoundsCollection = CalculateModelIntervals(this);
    180183    }
     
    189192      intervalEvaluation.AddInterval($"Target {problemData.TargetVariable}", new Interval(variableRanges[problemData.TargetVariable].LowerBound, variableRanges[problemData.TargetVariable].UpperBound));
    190193      intervalEvaluation.AddInterval("Model Interval", interpreter.GetSymbolicExpressionTreeInterval(model.SymbolicExpressionTree, variableRanges));
    191       foreach (var inputVariable in model.VariablesUsedForPrediction.OrderBy(v => v, new NaturalStringComparer())) {
    192         var derivedModel = DerivativeCalculator.Derive(model.SymbolicExpressionTree, inputVariable);
    193         var derivedResultInterval = interpreter.GetSymbolicExpressionTreeInterval(derivedModel, variableRanges);
    194 
    195         intervalEvaluation.AddInterval(" ∂f/∂" + inputVariable,
    196           new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound));
     194
     195      if (DerivativeCalculator.IsCompatible(model.SymbolicExpressionTree)) {
     196        foreach (var inputVariable in model.VariablesUsedForPrediction.OrderBy(v => v, new NaturalStringComparer())) {
     197          var derivedModel = DerivativeCalculator.Derive(model.SymbolicExpressionTree, inputVariable);
     198          var derivedResultInterval = interpreter.GetSymbolicExpressionTreeInterval(derivedModel, variableRanges);
     199
     200          intervalEvaluation.AddInterval(" ∂f/∂" + inputVariable, new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound));
     201        }
    197202      }
    198203
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r17510 r17538  
    211211        }
    212212
    213         if (IntervalInterpreter.IsCompatible(tree) && DerivativeCalculator.IsCompatible(tree)) {
     213        if (IntervalInterpreter.IsCompatible(tree)) {
    214214          var regressionProblemData = Content.ProblemData as IRegressionProblemData;
    215215          if (regressionProblemData != null) {
Note: See TracChangeset for help on using the changeset viewer.