Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5437


Ignore:
Timestamp:
02/04/11 22:00:45 (14 years ago)
Author:
gkronber
Message:

#1356 added default values for upper and lower estimation limits if they are not specified where necessary.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs

    r5331 r5437  
    185185        (!Maximization.Value && bestQuality < BestSolutionQuality.Value);
    186186      if (newBest) {
    187         double lowerEstimationLimit = LowerEstimationLimit.Value;
    188         double upperEstimationLimit = UpperEstimationLimit.Value;
     187        double upperEstimationLimit = UpperEstimationLimit != null ? UpperEstimationLimit.Value : double.PositiveInfinity;
     188        double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
    189189        string targetVariable = ProblemData.TargetVariable.Value;
    190190
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs

    r4722 r5437  
    140140
    141141    public override IOperation Apply() {
     142      double upperEstimationLimit = UpperEstimationLimit != null ? UpperEstimationLimit.Value : double.PositiveInfinity;
     143      double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
    142144      Analyze(SymbolicExpressionTreeParameter.ActualValue, SymbolicExpressionTreeInterpreterParameter.ActualValue,
    143         UpperEstimationLimit.Value, LowerEstimationLimit.Value, ProblemDataParameter.ActualValue,
     145        upperEstimationLimit, lowerEstimationLimit, ProblemDataParameter.ActualValue,
    144146        ResultsParameter.ActualValue);
    145147      return base.Apply();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/TrainingBestScaledSymbolicRegressionSolutionAnalyzer.cs

    r5331 r5437  
    277277        (!Maximization.Value && bestQuality < BestSolutionQuality.Value);
    278278      if (newBest) {
    279         double lowerEstimationLimit = LowerEstimationLimit.Value;
    280         double upperEstimationLimit = UpperEstimationLimit.Value;
     279        double upperEstimationLimit = UpperEstimationLimit != null ? UpperEstimationLimit.Value : double.PositiveInfinity;
     280        double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
    281281        string targetVariable = ProblemData.TargetVariable.Value;
    282282
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator.cs

    r4722 r5437  
    6969
    7070    protected override double[] Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
    71       double mse = SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
     71      double upperEstimationLimit = UpperEstimationLimit != null ? UpperEstimationLimit.Value : double.PositiveInfinity;
     72      double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
     73      double mse = SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable.Value, rows);
    7274      List<string> vars = new List<string>();
    7375      solution.Root.ForEachNodePostfix(n => {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs

    r4722 r5437  
    6969
    7070    protected override double[] Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
    71       double r2 = SymbolicRegressionPearsonsRSquaredEvaluator.Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
     71      double upperEstimationLimit = UpperEstimationLimit != null ? UpperEstimationLimit.Value : double.PositiveInfinity;
     72      double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
     73      double r2 = SymbolicRegressionPearsonsRSquaredEvaluator.Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable.Value, rows);
    7274      List<string> vars = new List<string>();
    7375      solution.Root.ForEachNodePostfix(n => {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SingleObjectiveSymbolicRegressionEvaluator.cs

    r5365 r5437  
    148148    public override IOperation Apply() {
    149149      int seed = Random.Next();
     150      double upperEstimationLimit = UpperEstimationLimit != null ? UpperEstimationLimit.Value : double.PositiveInfinity;
     151      double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
    150152      IEnumerable<int> rows = GenerateRowsToEvaluate(seed, RelativeNumberOfEvaluatedSamples.Value, SamplesStart.Value, SamplesEnd.Value)
    151153          .Where(i => i < RegressionProblemData.TestSamplesStart.Value || RegressionProblemData.TestSamplesEnd.Value <= i);
    152       double quality = Evaluate(SymbolicExpressionTreeInterpreter, SymbolicExpressionTree, LowerEstimationLimit.Value, UpperEstimationLimit.Value,
     154      double quality = Evaluate(SymbolicExpressionTreeInterpreter, SymbolicExpressionTree, lowerEstimationLimit, upperEstimationLimit,
    153155        RegressionProblemData.Dataset,
    154156        RegressionProblemData.TargetVariable.Value, rows);
Note: See TracChangeset for help on using the changeset viewer.