Changeset 13300 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNumberOfVariablesEvaluator.cs
- Timestamp:
- 11/19/15 14:15:19 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/PearsonRSquaredNumberOfVariablesEvaluator.cs
r13241 r13300 44 44 public PearsonRSquaredNumberOfVariablesEvaluator() : base() { } 45 45 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 47 47 48 48 public override IOperation InstrumentedApply() { … … 66 66 if (decimalPlaces >= 0) 67 67 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 69 69 } 70 70 … … 73 73 EstimationLimitsParameter.ExecutionContext = context; 74 74 ApplyLinearScalingParameter.ExecutionContext = context; 75 // DecimalPlaces parameter is a FixedValueParameter and doesn't need the context. 75 76 76 77 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value, DecimalPlaces);
Note: See TracChangeset
for help on using the changeset viewer.