Index: /trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs	(revision 15810)
@@ -23,5 +23,4 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Diagnostics.Contracts;
 using System.Linq;
 using HeuristicLab.Algorithms.DataAnalysis;
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 15810)
@@ -164,7 +164,4 @@
       solutionSeries.ChartType = SeriesChartType.FastLine;
       var residuals = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution));
-      residuals.Remove(double.NaN);
-      residuals.Remove(double.NegativeInfinity);
-      residuals.Remove(double.PositiveInfinity);
 
       var maxValue = residuals.Max();
@@ -252,10 +249,12 @@
     protected virtual List<double> GetResiduals(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues) {
       switch (residualComboBox.SelectedItem.ToString()) {
-        case "Absolute error": return originalValues.Zip(estimatedValues, (x, y) => Math.Abs(x - y)).ToList();
-        case "Squared error": return originalValues.Zip(estimatedValues, (x, y) => (x - y) * (x - y)).ToList();
+        case "Absolute error": return originalValues.Zip(estimatedValues, (x, y) => Math.Abs(x - y))
+            .Where(r => !double.IsNaN(r) && !double.IsInfinity(r)).ToList();
+        case "Squared error": return originalValues.Zip(estimatedValues, (x, y) => (x - y) * (x - y))
+            .Where(r => !double.IsNaN(r) && !double.IsInfinity(r)).ToList();
         case "Relative error":
           return originalValues.Zip(estimatedValues, (x, y) => x.IsAlmost(0.0) ? -1 : Math.Abs((x - y) / x))
-.Where(x => x > 0) // remove entries where the original value is 0
-.ToList();
+            .Where(r => r > 0 && !double.IsNaN(r) && !double.IsInfinity(r)) // remove entries where the original value is 0
+            .ToList();
         default: throw new NotSupportedException();
       }
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs	(revision 15810)
@@ -73,8 +73,8 @@
 
         var rows = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray();
-        var targetVariables = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
-
-
-        this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(rows.ToArray(), targetVariables.Select(v => double.IsInfinity(v) ? double.NaN : v).ToArray());
+        var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable);
+
+
+        this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(rows.ToArray(), targetValues.Select(v => double.IsInfinity(v) ? double.NaN : v).ToArray());
         // training series
         this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME);
@@ -164,5 +164,6 @@
       var targetValues = this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Select(x => x.YValues[0]).DefaultIfEmpty(1.0);
       double estimatedValuesRange = estimatedValues.Max() - estimatedValues.Min();
-      double targetValuesRange = targetValues.Where(v => !double.IsInfinity(v) && !double.IsNaN(v)).Max() - targetValues.Where(v => !double.IsNaN(v) && !double.IsInfinity(v)).Min();
+      double targetValuesRange = targetValues.Where(v => !double.IsInfinity(v) && !double.IsNaN(v)).Max() - 
+                                 targetValues.Where(v => !double.IsInfinity(v) && !double.IsNaN(v)).Min();
       double interestingValuesRange = Math.Min(Math.Max(targetValuesRange, 1.0), Math.Max(estimatedValuesRange, 1.0));
       double digits = (int)Math.Log10(interestingValuesRange) - 3;
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualHistogram.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualHistogram.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualHistogram.cs	(revision 15810)
@@ -81,7 +81,4 @@
       if (Content != null) {
         List<double> residuals = CalculateResiduals(Content);
-        residuals.Remove(double.NaN);
-        residuals.Remove(double.PositiveInfinity);
-        residuals.Remove(double.NegativeInfinity);
 
         double max = 0.0;
@@ -129,4 +126,6 @@
 
       for (int i = 0; i < solution.ProblemData.Dataset.Rows; i++) {
+        if (double.IsNaN(estimatedValues[i]) || double.IsInfinity(estimatedValues[i])) continue;
+        if (double.IsNaN(targetValues[i]) || double.IsInfinity(targetValues[i])) continue;
         double residual = estimatedValues[i] - targetValues[i];
         residuals.Add(residual);
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualsLineChartView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualsLineChartView.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualsLineChartView.cs	(revision 15810)
@@ -38,6 +38,9 @@
       var target = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, idx).ToArray();
       for (int i = 0; i < idx.Length; i++) {
-        if (!double.IsInfinity(target[i]) && !double.IsNaN(target[i])) {
+        if (!double.IsInfinity(target[i]) && !double.IsNaN(target[i]) &&
+            !double.IsInfinity(x[i]) && !double.IsNaN(x[i])) {
           x[i] = target[i] - x[i];
+        } else {
+          x[i] = 0.0;
         }
       }
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs	(revision 15810)
@@ -166,6 +166,14 @@
           this.chart.Series[TEST_SERIES].Points.DataBindXY(dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndices).ToArray(), "",
             Content.EstimatedTestValues.ToArray(), "");
-        double max = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Where(v => !double.IsInfinity(v)).Max();
-        double min = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Where(v => !double.IsNaN(v) && !double.IsNegativeInfinity(v)).Min();
+        double max = Content.EstimatedTrainingValues
+          .Concat(Content.EstimatedTestValues
+          .Concat(Content.EstimatedValues
+          .Concat(dataset.GetDoubleValues(targetVariableName))))
+          .Where(v => !double.IsNaN(v) && !double.IsInfinity(v)).Max();
+        double min = Content.EstimatedTrainingValues
+          .Concat(Content.EstimatedTestValues
+          .Concat(Content.EstimatedValues
+          .Concat(dataset.GetDoubleValues(targetVariableName))))
+          .Where(v => !double.IsNaN(v) && !double.IsInfinity(v)).Min();
 
         double axisMin, axisMax, axisInterval;
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.cs	(revision 15809)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.cs	(revision 15810)
@@ -20,7 +20,5 @@
 #endregion
 
-using System;
 using System.Linq;
-using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.MainForm;
 
