Changeset 10482
- Timestamp:
- 02/20/14 14:47:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LogResidualEvaluator/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionLogResidualEvaluator.cs
r10305 r10482 30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 32 [Item("Log Residual Evaluator", "Evaluator for symbolic regression models that calculates the mean of logarithmic absolute residuals avg(log( 1 + abs(y' - y)))." + 32 [Item("Log Residual Evaluator", "Evaluator for symbolic regression models that calculates the mean of logarithmic absolute residuals avg(log( 1 + abs(y' - y)))" + 33 "This evaluator does not perform linear scaling!" + 33 34 "This evaluator can be useful if the modeled function contains discontinuities (e.g. 1/x). " + 34 "In preliminary experiments, we found that this improves success rates for data sets with a few very large/small target values " + 35 "(e.g. Korns benchmark instances containing inverses of near zero values). In these cases the squared error or absolute " + 36 "error puts too much emphasis on modeling the outlier values. Using log-residuals instead of e.g. squared residuals has the " + 37 "effect that smaller residuals have a stronger impact on the total quality compared to the very large residuals occuring with such extreme values." + 35 "For some data sets (e.g. Korns benchmark instances containing inverses of near zero values) the squared error or absolute " + 36 "error put too much emphasis on modeling the outlier values. Using log-residuals instead has the " + 37 "effect that smaller residuals have a stronger impact on the total quality compared to the large residuals." + 38 38 "This effects GP convergence because functional fragments which are necessary to explain small variations are also more likely" + 39 39 " to stay in the population. This is useful even when the actual objective function is mean of squared errors.")] … … 57 57 IEnumerable<int> rows = GenerateRowsToEvaluate(); 58 58 59 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows , ApplyLinearScalingParameter.ActualValue.Value);59 double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows); 60 60 QualityParameter.ActualValue = new DoubleValue(quality); 61 61 … … 63 63 } 64 64 65 public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows , bool applyLinearScaling) {65 public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) { 66 66 IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows); 67 67 IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows); … … 82 82 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context; 83 83 EstimationLimitsParameter.ExecutionContext = context; 84 ApplyLinearScalingParameter.ExecutionContext = context;85 84 86 double mlr = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows , ApplyLinearScalingParameter.ActualValue.Value);85 double mlr = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows); 87 86 88 87 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; 89 88 EstimationLimitsParameter.ExecutionContext = null; 90 ApplyLinearScalingParameter.ExecutionContext = null;91 89 92 90 return mlr;
Note: See TracChangeset
for help on using the changeset viewer.