Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13221


Ignore:
Timestamp:
11/17/15 15:57:52 (9 years ago)
Author:
mkommend
Message:

#2175: Removed unused features from complexity analysis.

Location:
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredTreeComplexityEvaluator.cs

    r13211 r13221  
    6565      if (decimalPlaces >= 0)
    6666        r2 = Math.Round(r2, decimalPlaces);
    67       return new double[2] { r2, SymbolicDataAnalysisModelComplexityAnalyzer.CalculateComplexity(solution.Root.GetSubtree(0).GetSubtree(0)) };
     67      return new double[2] { r2, SymbolicDataAnalysisModelComplexityCalculator.CalculateComplexity(solution) };
    6868    }
    6969
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r13211 r13221  
    9696    public override IOperation Apply() {
    9797      var operation = base.Apply();
    98 
    9998      var paretoFront = TrainingBestSolutionsParameter.ActualValue;
    10099
     
    131130      }
    132131
    133 
    134 
    135132      qualityToTreeSize.Rows.Clear();
    136133      var trainingRow = new ScatterPlotDataRow("Training NMSE", "", sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, x.TrainingNormalizedMeanSquaredError)));
    137       trainingRow.VisualProperties.PointSize = 5;
     134      trainingRow.VisualProperties.PointSize = 8;
    138135      qualityToTreeSize.Rows.Add(trainingRow);
    139136
     
    147144          sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length,
    148145          OnlineNormalizedMeanSquaredErrorCalculator.Calculate(targetValues, x.GetEstimatedValues(validationIndizes), out error))));
    149         validationRow.VisualProperties.PointSize = 5;
     146        validationRow.VisualProperties.PointSize = 7;
    150147        qualityToTreeSize.Rows.Add(validationRow);
    151148      }
    152 
    153       double trainingArea = sizeParetoFront.Select(s => s.Model.SymbolicExpressionTree.Length * s.TrainingNormalizedMeanSquaredError).Average();
    154       double testArea = sizeParetoFront.Select(s => s.Model.SymbolicExpressionTree.Length * s.TestNormalizedMeanSquaredError).Average();
    155 
    156       ResultCollection paretoFrontResults;
    157       if (!ResultCollection.TryGetValue("Pareto Front Results", out result)) {
    158         paretoFrontResults = new ResultCollection();
    159         ResultCollection.Add(new Result("Pareto Front Results", paretoFrontResults));
    160       } else paretoFrontResults = (ResultCollection)result.Value;
    161 
    162       DoubleValue trainingAreaResult, testAreaResult, areaDifferenceResult, avgTrainingNMSE, avgTestNMSE;
    163       if (!paretoFrontResults.TryGetValue("Non Dominated Area (training)", out result)) {
    164         trainingAreaResult = new DoubleValue();
    165         paretoFrontResults.Add(new Result("Non Dominated Area (training)", trainingAreaResult));
    166       } else trainingAreaResult = (DoubleValue)result.Value;
    167       if (!paretoFrontResults.TryGetValue("Non Dominated Area (test)", out result)) {
    168         testAreaResult = new DoubleValue();
    169         paretoFrontResults.Add(new Result("Non Dominated Area (test)", testAreaResult));
    170       } else testAreaResult = (DoubleValue)result.Value;
    171       if (!paretoFrontResults.TryGetValue("Non Dominated Area Difference", out result)) {
    172         areaDifferenceResult = new DoubleValue();
    173         paretoFrontResults.Add(new Result("Non Dominated Area Difference", areaDifferenceResult));
    174       } else areaDifferenceResult = (DoubleValue)result.Value;
    175       if (!paretoFrontResults.TryGetValue("Average Training NMSE", out result)) {
    176         avgTrainingNMSE = new DoubleValue();
    177         paretoFrontResults.Add(new Result("Average Training NMSE", avgTrainingNMSE));
    178       } else avgTrainingNMSE = (DoubleValue)result.Value;
    179       if (!paretoFrontResults.TryGetValue("Average Test NMSE", out result)) {
    180         avgTestNMSE = new DoubleValue();
    181         paretoFrontResults.Add(new Result("Average Test NMSE", avgTestNMSE));
    182       } else avgTestNMSE = (DoubleValue)result.Value;
    183 
    184       trainingAreaResult.Value = trainingArea;
    185       testAreaResult.Value = testArea;
    186       areaDifferenceResult.Value = trainingArea - testArea;
    187       avgTrainingNMSE.Value = sizeParetoFront.Select(s => s.TrainingNormalizedMeanSquaredError).Average();
    188       avgTestNMSE.Value = sizeParetoFront.Select(s => s.TestNormalizedMeanSquaredError).Average();
    189149
    190150      return operation;
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs

    r12130 r13221  
    6464    }
    6565
    66     public double ModelComplexity {
    67       get { return ((DoubleValue)this["Complexity"].Value).Value; }
    68       private set { ((DoubleValue)this["Complexity"].Value).Value = value; }
    69     }
    70 
    7166    private ResultCollection EstimationLimitsResultCollection {
    7267      get { return (ResultCollection)this[EstimationLimitsResultsResultName].Value; }
     
    123118      estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
    124119      Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
    125       Add(new Result("Complexity", "", new DoubleValue()));
    126120      RecalculateResults();
    127121    }
     
    133127    [StorableHook(HookType.AfterDeserialization)]
    134128    private void AfterDeserialization() {
    135       if (!ContainsKey("Complexity")) Add(new Result("Complexity", "", new DoubleValue()));
    136129      if (!ContainsKey(EstimationLimitsResultsResultName)) {
    137130        ResultCollection estimationLimitResults = new ResultCollection();
     
    156149      ModelLength = Model.SymbolicExpressionTree.Length;
    157150      ModelDepth = Model.SymbolicExpressionTree.Depth;
    158       ModelComplexity = SymbolicDataAnalysisModelComplexityAnalyzer.CalculateComplexity(Model.SymbolicExpressionTree.Root.GetSubtree(0).GetSubtree(0));
    159151
    160152      EstimationLimits.Lower = Model.LowerEstimationLimit;
Note: See TracChangeset for help on using the changeset viewer.