Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2367)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2368)
@@ -308,4 +308,25 @@
       return min;
     }
+
+    public int CountMissingValues(string variableName) {
+      return CountMissingValues(this.GetVariableIndex(variableName));
+    }
+    public int CountMissingValues(int column) {
+      return CountMissingValues(column, 0, Rows);
+    }
+
+    public int CountMissingValues(string variableName, int start, int end) {
+      return CountMissingValues(this.GetVariableIndex(variableName), start, end);
+    }
+
+    public int CountMissingValues(int column, int start, int end) {
+      int n = 0;
+      for (int i = start; i < end; i++) {
+        double val = GetValue(i, column);
+        if (double.IsNaN(val)) n++;
+      }
+      return n;
+    }
+
     #endregion
 
Index: /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs	(revision 2367)
+++ /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs	(revision 2368)
@@ -139,5 +139,5 @@
       double n = end - start;
       for (int i = 0; i < dataset.Columns; i++) {
-        double nanRatio = CountNaN(dataset, i, start, end) / n;
+        double nanRatio = dataset.CountMissingValues(i, start, end) / n;
         if (i != targetVariable && nanRatio < 0.1 && dataset.GetRange(i, start, end) > 0.0) {
           allowedColumns.Add(i);
@@ -146,14 +146,4 @@
       return allowedColumns;
     }
-
-    private double CountNaN(Dataset dataset, int column, int start, int end) {
-      double n = 0;
-      for (int i = start; i < end; i++) {
-        if (double.IsNaN(dataset.GetValue(i, column)) || double.IsInfinity(dataset.GetValue(i, column)))
-          n++;
-      }
-      return n;
-    }
-
 
     private double[,] PrepareInputMatrix(Dataset dataset, List<int> allowedColumns, List<int> allowedRows, int minTimeOffset, int maxTimeOffset) {
Index: /trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs	(revision 2367)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs	(revision 2368)
@@ -97,9 +97,13 @@
       foreach (string variableName in variables) {
         if (variableName != targetVariableName) {
-          mean = dataset.GetMean(variableName, start, end);
-          oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end);
-          newValues = predictor.Predict(dirtyDataset, start, end);
-          evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues);
-          dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end);
+          if (dataset.CountMissingValues(variableName, start, end) < (end - start) && dataset.GetRange(variableName, start, end) > 0.0) {
+            mean = dataset.GetMean(variableName, start, end);
+            oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end);
+            newValues = predictor.Predict(dirtyDataset, start, end);
+            evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues);
+            dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end);
+          } else {
+            evaluationImpacts[variableName] = 0.0;
+          }
         }
       }
Index: /trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs	(revision 2367)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs	(revision 2368)
@@ -99,5 +99,7 @@
 
       foreach (string variableName in variables) {
-        if (variableName != targetVariableName) {
+        if (dataset.CountMissingValues(variableName, start, end) < (end - start) &&
+          dataset.GetRange(variableName, start, end) > 0.0 &&
+          variableName != targetVariableName) {
           mean = dataset.GetMean(variableName, start, end);
           oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end);
@@ -106,4 +108,6 @@
           evaluationImpacts[variableName] = newMSE / oldMSE;
           dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end);
+        } else {
+          evaluationImpacts[variableName] = 1.0;
         }
       }
