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

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators
Files:
2 edited

Legend:

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

    r4128 r4190  
    3434  [StorableClass]
    3535  public class SymbolicRegressionNormalizedMeanSquaredErrorEvaluator : SingleObjectiveSymbolicRegressionEvaluator {
    36     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    37     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    38 
    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
    5536    public SymbolicRegressionNormalizedMeanSquaredErrorEvaluator()
    5637      : 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."));
    5938    }
    6039
    61     protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
    62       double nmse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
     40    public override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
     41      double nmse = Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows);
    6342      return nmse;
    6443    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledNormalizedMeanSquaredErrorEvaluator.cs

    r4068 r4190  
    5959    }
    6060
    61     protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
     61    public override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
    6262      double alpha, beta;
    63       double nmse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows, out beta, out alpha);
     63      double nmse = Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows, out beta, out alpha);
    6464      AlphaParameter.ActualValue = new DoubleValue(alpha);
    6565      BetaParameter.ActualValue = new DoubleValue(beta);
Note: See TracChangeset for help on using the changeset viewer.