- Timestamp:
- 03/28/11 20:04:51 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs
r5823 r5851 44 44 private const string EvaluationPartitionParameterName = "EvaluationPartition"; 45 45 private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples"; 46 private const string EvaluatedNodesParameterName = "EvaluatedNodes"; 46 47 47 48 public override bool CanChangeName { get { return false; } } … … 56 57 public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { 57 58 get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; } 59 } 60 public ILookupParameter<DoubleValue> EvaluatedNodesParameter { 61 get { return (ILookupParameter<DoubleValue>)Parameters[EvaluatedNodesParameterName]; } 58 62 } 59 63 public IValueLookupParameter<T> ProblemDataParameter { … … 83 87 Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree.")); 84 88 Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree.")); 89 Parameters.Add(new LookupParameter<DoubleValue>(EvaluatedNodesParameterName, "The total number of evaluated symbolic expression tree nodes.")); 85 90 Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated.")); 86 91 Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated.")); … … 102 107 .Where(i => i < testPartitionStart || testPartitionEnd <= i); 103 108 } 109 110 protected void AddEvaluatedNodes(double numberOfNodes) { 111 if (EvaluatedNodesParameter.ActualValue == null) EvaluatedNodesParameter.ActualValue = new DoubleValue(); 112 double curEvaluatedNodes = EvaluatedNodesParameter.ActualValue.Value; 113 EvaluatedNodesParameter.ActualValue = new DoubleValue(curEvaluatedNodes + numberOfNodes); 114 } 104 115 } 105 116 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisSingleObjectiveEvaluator.cs
r5809 r5851 20 20 #endregion 21 21 22 using System.Linq; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 39 40 #endregion 40 41 #region properties 41 public DoubleValue Quality {42 get { return QualityParameter.ActualValue; }43 set { QualityParameter.ActualValue = value; }44 }45 42 public abstract bool Maximization { get; } 46 43 #endregion … … 56 53 } 57 54 58 59 55 public abstract double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, T problemData, IEnumerable<int> rows); 60 56 }
Note: See TracChangeset
for help on using the changeset viewer.