- Timestamp:
- 02/20/18 11:20:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r15583 r15789 164 164 solutionSeries.ChartType = SeriesChartType.FastLine; 165 165 var residuals = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution)); 166 residuals.Remove(double.NaN); 167 residuals.Remove(double.NegativeInfinity); 168 residuals.Remove(double.PositiveInfinity); 166 169 167 170 var maxValue = residuals.Max(); … … 251 254 case "Absolute error": return originalValues.Zip(estimatedValues, (x, y) => Math.Abs(x - y)).ToList(); 252 255 case "Squared error": return originalValues.Zip(estimatedValues, (x, y) => (x - y) * (x - y)).ToList(); 253 case "Relative error": return originalValues.Zip(estimatedValues, (x, y) => x.IsAlmost(0.0) ? -1 : Math.Abs((x - y) / x)) 254 .Where(x => x > 0) // remove entries where the original value is 0 255 .ToList(); 256 case "Relative error": 257 return originalValues.Zip(estimatedValues, (x, y) => x.IsAlmost(0.0) ? -1 : Math.Abs((x - y) / x)) 258 .Where(x => x > 0) // remove entries where the original value is 0 259 .ToList(); 256 260 default: throw new NotSupportedException(); 257 261 }
Note: See TracChangeset
for help on using the changeset viewer.