Changeset 5851 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective
- Timestamp:
- 03/28/11 20:04:51 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs
r5809 r5851 20 20 #endregion 21 21 22 using System.Linq; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 45 46 46 47 public override IOperation Apply() { 48 var solution = SymbolicExpressionTreeParameter.ActualValue; 47 49 IEnumerable<int> rows = GenerateRowsToEvaluate(); 48 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 49 Quality = new DoubleValue(quality); 50 51 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 52 QualityParameter.ActualValue = new DoubleValue(quality); 53 AddEvaluatedNodes(solution.Length * rows.Count()); 54 50 55 return base.Apply(); 51 56 } … … 61 66 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context; 62 67 EstimationLimitsParameter.ExecutionContext = context; 68 EvaluatedNodesParameter.ExecutionContext = context; 63 69 64 70 double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 65 71 72 AddEvaluatedNodes(tree.Length * rows.Count()); 73 66 74 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 67 75 EstimationLimitsParameter.ExecutionContext = null; 76 EvaluatedNodesParameter.ExecutionContext = null; 68 77 69 78 return mse; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
r5846 r5851 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Collections.Generic; 24 25 using HeuristicLab.Common; … … 46 47 47 48 public override IOperation Apply() { 49 var solution = SymbolicExpressionTreeParameter.ActualValue; 48 50 IEnumerable<int> rows = GenerateRowsToEvaluate(); 49 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 50 Quality = new DoubleValue(quality); 51 52 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 53 QualityParameter.ActualValue = new DoubleValue(quality); 54 AddEvaluatedNodes(solution.Length * rows.Count()); 55 51 56 return base.Apply(); 52 57 } … … 62 67 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context; 63 68 EstimationLimitsParameter.ExecutionContext = context; 69 EvaluatedNodesParameter.ExecutionContext = context; 64 70 65 71 double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 72 AddEvaluatedNodes(tree.Length * rows.Count()); 66 73 67 74 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 68 75 EstimationLimitsParameter.ExecutionContext = null; 76 EvaluatedNodesParameter.ExecutionContext = null; 69 77 70 78 return r2;
Note: See TracChangeset
for help on using the changeset viewer.