Changeset 5747 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective
- Timestamp:
- 03/18/11 10:01:00 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r5722 r5747 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System; 28 29 29 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5722 r5747 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System; 28 29 29 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 54 55 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 56 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 56 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues); 57 return new double[2] { r2, solution.Length }; 57 try { 58 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues); 59 return new double[2] { r2, solution.Length }; 60 } 61 catch (ArgumentException) { 62 // if R² cannot be calcualted return worst possible fitness value 63 return new double[2] { 0.0, solution.Length }; 64 } 58 65 } 59 66 -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs
r5729 r5747 38 38 [StorableClass] 39 39 public sealed class SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<ISymbolicRegressionSolution>, 40 ISymbolicDataAnalysisInterpreterOperator {40 ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator { 41 41 private const string ProblemDataParameterName = "ProblemData"; 42 42 private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
Note: See TracChangeset
for help on using the changeset viewer.