Free cookie consent management tool by TermsFeed Policy Generator

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

#2175 made some changes while reviewing the code

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
Files:
4 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;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNumberOfVariablesEvaluator.cs

    r13241 r13300  
    4444    public PearsonRSquaredNumberOfVariablesEvaluator() : 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² and minimize the number of variables
    4747
    4848    public override IOperation InstrumentedApply() {
     
    6666      if (decimalPlaces >= 0)
    6767        r2 = Math.Round(r2, decimalPlaces);
    68       return new double[2] { r2, solution.IterateNodesPostfix().OfType<VariableTreeNode>().Count() };
     68      return new double[2] { r2, solution.IterateNodesPostfix().OfType<VariableTreeNode>().Count() }; // count the number of variables
    6969    }
    7070
     
    7373      EstimationLimitsParameter.ExecutionContext = context;
    7474      ApplyLinearScalingParameter.ExecutionContext = context;
     75      // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context.
    7576
    7677      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredTreeComplexityEvaluator.cs

    r13241 r13300  
    4343    public PearsonRSquaredTreeComplexityEvaluator() : base() { }
    4444
    45     public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } }
     45    public override IEnumerable<bool> Maximization { get { return new bool[2] { true, false }; } } // maximize R² and minimize model complexity
    4646
    4747    public override IOperation InstrumentedApply() {
     
    7272      EstimationLimitsParameter.ExecutionContext = context;
    7373      ApplyLinearScalingParameter.ExecutionContext = context;
     74      // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context.
    7475
    7576      double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs

    r12509 r13300  
    164164
    165165
     166    // TODO: swap positions of lowerEstimationLimit and upperEstimationLimit parameters
    166167    public static double OptimizeConstants(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree tree, IRegressionProblemData problemData,
    167168      IEnumerable<int> rows, bool applyLinearScaling, int maxIterations, double upperEstimationLimit = double.MaxValue, double lowerEstimationLimit = double.MinValue, bool updateConstantsInTree = true) {
Note: See TracChangeset for help on using the changeset viewer.