- Timestamp:
- 03/30/11 18:04:03 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r5851 r5894 58 58 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 59 59 IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit); 60 double mse = OnlineMeanSquaredErrorEvaluator.Calculate(originalValues, boundedEstimationValues); 60 OnlineEvaluatorError errorState; 61 double mse = OnlineMeanSquaredErrorEvaluator.Calculate(originalValues, boundedEstimationValues, out errorState); 62 if (errorState != OnlineEvaluatorError.None) mse = double.NaN; 61 63 return new double[2] { mse, solution.Length }; 62 64 } … … 72 74 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 73 75 EstimationLimitsParameter.ExecutionContext = null; 74 EvaluatedNodesParameter.ExecutionContext = null; 76 EvaluatedNodesParameter.ExecutionContext = null; 75 77 76 78 return quality; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5851 r5894 37 37 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 38 38 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 39 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(estimatedValues, originalValues); 40 return new double[] { double.IsNaN(r2) ? 0.0 : r2, solution.Length }; 39 OnlineEvaluatorError errorState; 40 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(estimatedValues, originalValues, out errorState); 41 if (errorState != OnlineEvaluatorError.None) r2 = 0.0; 42 return new double[] { r2, solution.Length }; 43 41 44 } 42 45 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs
r5851 r5894 63 63 IEnumerator<double> originalEnumerator = originalValues.GetEnumerator(); 64 64 IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator(); 65 OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();66 65 double errorSum = 0.0; 67 66 int n = 0; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs
r5851 r5894 58 58 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 59 59 IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit); 60 return OnlineMeanSquaredErrorEvaluator.Calculate(originalValues, boundedEstimationValues); 60 OnlineEvaluatorError errorState; 61 double mse = OnlineMeanSquaredErrorEvaluator.Calculate(originalValues, boundedEstimationValues, out errorState); 62 if (errorState != OnlineEvaluatorError.None) return double.NaN; 63 else return mse; 61 64 } 62 65 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
r5851 r5894 58 58 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 59 59 IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows); 60 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(estimatedValues, originalValues); 61 return double.IsNaN(r2) ? 0.0 : r2; 60 OnlineEvaluatorError errorState; 61 double r2 = OnlinePearsonsRSquaredEvaluator.Calculate(estimatedValues, originalValues, out errorState); 62 if (errorState != OnlineEvaluatorError.None) return 0.0; 63 else return r2; 62 64 } 63 65 … … 72 74 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 73 75 EstimationLimitsParameter.ExecutionContext = null; 74 EvaluatedNodesParameter.ExecutionContext = null; 76 EvaluatedNodesParameter.ExecutionContext = null; 75 77 76 78 return r2; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
r5818 r5894 124 124 double alpha; 125 125 double beta; 126 OnlineLinearScalingParameterCalculator.Calculate(estimatedValues, targetValues, out alpha, out beta); 126 OnlineEvaluatorError errorState; 127 OnlineLinearScalingParameterCalculator.Calculate(estimatedValues, targetValues, out alpha, out beta, out errorState); 128 if (errorState != OnlineEvaluatorError.None) return; 127 129 128 130 ConstantTreeNode alphaTreeNode = null;
Note: See TracChangeset
for help on using the changeset viewer.