Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5439 for trunk


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
Files:
3 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  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/MultiObjectiveSymbolicRegressionProblem.cs

    r4722 r5439  
    7171    public MultiObjectiveSymbolicRegressionProblem()
    7272      : base() {
    73       var evaluator = new MultiObjectiveSymbolicRegressionMeanSquaredErrorEvaluator();
    74       Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false as the error of the regression model should be minimized.", new BoolArray(new bool[] { false, false })));
     73      var evaluator = new MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator();
     74      Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false as the error of the regression model should be minimized.", new BoolArray(new bool[] { true, false })));
    7575      Parameters.Add(new ValueParameter<IMultiObjectiveSymbolicRegressionEvaluator>("Evaluator", "The operator which should be used to evaluate symbolic regression solutions.", evaluator));
    7676
Note: See TracChangeset for help on using the changeset viewer.