Changeset 5851 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective
- Timestamp:
- 03/28/11 20:04:51 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs
r5809 r5851 33 33 [StorableClass] 34 34 public class SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator : SymbolicClassificationSingleObjectiveEvaluator { 35 36 35 [StorableConstructor] 37 36 protected SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator(bool deserializing) : base(deserializing) { } … … 47 46 public override IOperation Apply() { 48 47 IEnumerable<int> rows = GenerateRowsToEvaluate(); 49 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 48 var solution = SymbolicExpressionTreeParameter.ActualValue; 49 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 50 50 QualityParameter.ActualValue = new DoubleValue(quality); 51 AddEvaluatedNodes(solution.Length * rows.Count()); 51 52 return base.Apply(); 52 53 } … … 88 89 89 90 public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) { 90 return Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 91 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context; 92 EstimationLimitsParameter.ExecutionContext = context; 93 EvaluatedNodesParameter.ExecutionContext = context; 94 95 double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 96 AddEvaluatedNodes(tree.Length * rows.Count()); 97 98 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 99 EstimationLimitsParameter.ExecutionContext = null; 100 EvaluatedNodesParameter.ExecutionContext = null; 101 102 return mse; 91 103 } 92 104 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs
r5809 r5851 20 20 #endregion 21 21 22 using System.Linq; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 46 47 public override IOperation Apply() { 47 48 IEnumerable<int> rows = GenerateRowsToEvaluate(); 48 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 49 var solution = SymbolicExpressionTreeParameter.ActualValue; 50 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 49 51 QualityParameter.ActualValue = new DoubleValue(quality); 52 AddEvaluatedNodes(solution.Length * rows.Count()); 50 53 return base.Apply(); 51 54 } … … 61 64 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context; 62 65 EstimationLimitsParameter.ExecutionContext = context; 66 EvaluatedNodesParameter.ExecutionContext = context; 63 67 64 68 double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 69 AddEvaluatedNodes(tree.Length * rows.Count()); 65 70 66 71 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 67 72 EstimationLimitsParameter.ExecutionContext = null; 73 EvaluatedNodesParameter.ExecutionContext = null; 68 74 69 75 return mse; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
r5846 r5851 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Collections.Generic; 24 25 using HeuristicLab.Common; … … 47 48 public override IOperation Apply() { 48 49 IEnumerable<int> rows = GenerateRowsToEvaluate(); 49 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 50 var solution = SymbolicExpressionTreeParameter.ActualValue; 51 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 50 52 QualityParameter.ActualValue = new DoubleValue(quality); 53 AddEvaluatedNodes(solution.Length * rows.Count()); 51 54 return base.Apply(); 52 55 } … … 62 65 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context; 63 66 EstimationLimitsParameter.ExecutionContext = context; 67 EvaluatedNodesParameter.ExecutionContext = context; 64 68 65 69 double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 70 AddEvaluatedNodes(tree.Length * rows.Count()); 66 71 67 72 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 68 73 EstimationLimitsParameter.ExecutionContext = null; 74 EvaluatedNodesParameter.ExecutionContext = null; 69 75 70 76 return r2;
Note: See TracChangeset
for help on using the changeset viewer.