Changeset 5747 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective
- Timestamp:
- 03/18/11 10:01:00 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.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 { -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5722 r5747 5 5 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 6 6 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 using System; 7 8 8 9 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { … … 33 34 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 34 35 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 35 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues); 36 return new double[2] { r2, solution.Length }; 36 try { 37 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(originalValues, estimatedValues); 38 return new double[2] { r2, solution.Length }; 39 } 40 catch (ArgumentException) { 41 // if R² cannot be calcualted because of infinity or NaN values => return worst possible fitness value 42 return new double[2] { 0.0, solution.Length }; 43 } 37 44 } 38 45 -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer.cs
r5736 r5747 38 38 [StorableClass] 39 39 public sealed class SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisMultiObjectiveTrainingBestSolutionAnalyzer<ISymbolicClassificationSolution>, 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.