Changeset 5851 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs
- Timestamp:
- 03/28/11 20:04:51 (14 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.