Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15790


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

#2383: Added additional NaN-check and also check for both Infinities (+,-) for RegressionSolutionLineChartViewBase

File:
1 edited

Legend:

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

    r15787 r15790  
    173173      var targetValues = this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
    174174      double estimatedValuesRange = estimatedValues.Max() - estimatedValues.Min();
    175       double targetValuesRange = targetValues.Where(v => !double.IsInfinity(v)).Max() - targetValues.Where(v => !double.IsNaN(v) && !double.IsNegativeInfinity(v)).Min();
     175      double targetValuesRange = targetValues.Where(v => !double.IsInfinity(v) && !double.IsNaN(v)).Max() - targetValues.Where(v => !double.IsNaN(v) && !double.IsInfinity(v)).Min();
    176176      double interestingValuesRange = Math.Min(Math.Max(targetValuesRange, 1.0), Math.Max(estimatedValuesRange, 1.0));
    177177      double digits = (int)Math.Log10(interestingValuesRange) - 3;
Note: See TracChangeset for help on using the changeset viewer.