Changeset 5439
- Timestamp:
- 02/04/11 23:31:10 (14 years ago)
- 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 72 72 double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity; 73 73 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 }; 82 75 } 83 76 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs
r5437 r5439 72 72 double lowerEstimationLimit = LowerEstimationLimit != null ? LowerEstimationLimit.Value : double.NegativeInfinity; 73 73 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 }; 82 75 } 83 76 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/MultiObjectiveSymbolicRegressionProblem.cs
r4722 r5439 71 71 public MultiObjectiveSymbolicRegressionProblem() 72 72 : base() { 73 var evaluator = new MultiObjectiveSymbolicRegression MeanSquaredErrorEvaluator();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 }))); 75 75 Parameters.Add(new ValueParameter<IMultiObjectiveSymbolicRegressionEvaluator>("Evaluator", "The operator which should be used to evaluate symbolic regression solutions.", evaluator)); 76 76
Note: See TracChangeset
for help on using the changeset viewer.