Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/20/18 11:20:58 (7 years ago)
Author:
fholzing
Message:

#2383: Added additional filter for Error Characteristics Curve

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r15583 r15789  
    164164      solutionSeries.ChartType = SeriesChartType.FastLine;
    165165      var residuals = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution));
     166      residuals.Remove(double.NaN);
     167      residuals.Remove(double.NegativeInfinity);
     168      residuals.Remove(double.PositiveInfinity);
    166169
    167170      var maxValue = residuals.Max();
     
    251254        case "Absolute error": return originalValues.Zip(estimatedValues, (x, y) => Math.Abs(x - y)).ToList();
    252255        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();
    256260        default: throw new NotSupportedException();
    257261      }
Note: See TracChangeset for help on using the changeset viewer.