Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/11/10 11:53:45 (14 years ago)
Author:
gkronber
Message:

Moved upper and lower estimation limit parameters into ISymbolicRegressionEvaluator interface and introduced an Evaluate method in the interface in preparation for a ISymbolicRegressionEvaluator parameter for the validation best solution analyzer. #1117

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionMeanSquaredErrorEvaluator.cs

    r4128 r4190  
    3434  [StorableClass]
    3535  public class SymbolicRegressionMeanSquaredErrorEvaluator : SingleObjectiveSymbolicRegressionEvaluator {
    36     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    37     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    3836
    39     #region parameter properties
    40     public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
    41       get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    42     }
    43     public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    44       get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    45     }
    46     #endregion
    47     #region properties
    48     public DoubleValue UpperEstimationLimit {
    49       get { return UpperEstimationLimitParameter.ActualValue; }
    50     }
    51     public DoubleValue LowerEstimationLimit {
    52       get { return LowerEstimationLimitParameter.ActualValue; }
    53     }
    54     #endregion
    5537    public SymbolicRegressionMeanSquaredErrorEvaluator()
    5638      : base() {
    57       Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees."));
    58       Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees."));
    5939    }
    6040
    61     protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
    62       double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
     41    public override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
     42      double mse = Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows);
    6343      return mse;
    6444    }
Note: See TracChangeset for help on using the changeset viewer.