Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/15 14:15:19 (9 years ago)
Author:
gkronber
Message:

#2175 made some changes while reviewing the code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNestedTreeSizeEvaluator.cs

    r13241 r13300  
    4444    public PearsonRSquaredNestedTreeSizeEvaluator() : base() { }
    4545
    46     public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
     46    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } // maximize R² & minimize nested tree size
    4747
    4848    public override IOperation InstrumentedApply() {
     
    6767      if (decimalPlaces >= 0)
    6868        r2 = Math.Round(r2, decimalPlaces);
    69       return new double[2] { r2, solution.IterateNodesPostfix().Sum(n => n.GetLength()) };
     69      return new double[2] { r2, solution.IterateNodesPostfix().Sum(n => n.GetLength()) }; // sum of the length of the whole sub-tree for each node
    7070    }
    7171
     
    7474      EstimationLimitsParameter.ExecutionContext = context;
    7575      ApplyLinearScalingParameter.ExecutionContext = context;
     76      // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context.
    7677
    77       double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
     78      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces); 
    7879
    7980      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
Note: See TracChangeset for help on using the changeset viewer.