Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/04/11 23:31:10 (14 years ago)
Author:
gkronber
Message:

#1040 Not directly related to NSGA-II implementation but not worth a separate ticket. Made minor improvements in multi-objective symbolic regression problem to make it work better with NSGA-II.

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

Legend:

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

    r5437 r5439  
    7272      double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
    7373      double mse = SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable.Value, rows);
    74       List<string> vars = new List<string>();
    75       solution.Root.ForEachNodePostfix(n => {
    76         var varNode = n as VariableTreeNode;
    77         if (varNode != null && !vars.Contains(varNode.VariableName)) {
    78           vars.Add(varNode.VariableName);
    79         }
    80       });
    81       return new double[2] { mse, vars.Count };
     74      return new double[2] { mse, solution.Size };
    8275    }
    8376  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs

    r5437 r5439  
    7272      double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity;
    7373      double r2 = SymbolicRegressionPearsonsRSquaredEvaluator.Calculate(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable.Value, rows);
    74       List<string> vars = new List<string>();
    75       solution.Root.ForEachNodePostfix(n => {
    76         var varNode = n as VariableTreeNode;
    77         if (varNode != null && !vars.Contains(varNode.VariableName)) {
    78           vars.Add(varNode.VariableName);
    79         }
    80       });
    81       return new double[2] { r2, vars.Count };
     74      return new double[2] { r2, solution.Size };
    8275    }
    8376  }
Note: See TracChangeset for help on using the changeset viewer.