Changeset 5747 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
- Timestamp:
- 03/18/11 10:01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.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.Classification { … … 54 55 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 55 56 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 56 return OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues); 57 try { 58 return OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues); 59 } 60 catch (ArgumentException) { 61 // if R² cannot be calculated because of NaN or ininity elements => return worst possible fitness valuse 62 return 0.0; 63 } 57 64 } 58 65
Note: See TracChangeset
for help on using the changeset viewer.