Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.cs	(revision 13714)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.cs	(revision 13715)
@@ -43,4 +43,9 @@
       get { return (RegressionEnsembleSolution)base.Content; }
       set { base.Content = value; }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      averageEstimatesCheckBox.Enabled = Content != null && !Locked && !ReadOnly;
     }
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 13714)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 13715)
@@ -109,5 +109,4 @@
     }
 
-    #region IRegressionEnsembleModel Members
     public void Add(IRegressionModel model) {
       Add(model, 1.0);
@@ -153,4 +152,5 @@
     }
 
+    #region evaluation
     public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
       var estimatedValuesEnumerators = (from model in models
@@ -165,26 +165,43 @@
     }
 
+    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
+      double weightsSum = modelWeights.Sum();
+      var summedEstimates = from estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)
+                            select estimatedValuesVector.DefaultIfEmpty(double.NaN).Sum();
+
+      if (AverageModelEstimates)
+        return summedEstimates.Select(v => v / weightsSum);
+      else
+        return summedEstimates;
+
+    }
+
     public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows, Func<int, IRegressionModel, bool> modelSelectionPredicate) {
       var estimatedValuesEnumerators = GetEstimatedValueVectors(dataset, rows).GetEnumerator();
       var rowsEnumerator = rows.GetEnumerator();
 
-      // aggregate to make sure that MoveNext is called for all enumerators 
       while (rowsEnumerator.MoveNext() & estimatedValuesEnumerators.MoveNext()) {
+        var estimatedValueEnumerator = estimatedValuesEnumerators.Current.GetEnumerator();
         int currentRow = rowsEnumerator.Current;
-
-        var filteredEstimates = models.Zip(estimatedValuesEnumerators.Current, (m, e) => new { Model = m, EstimatedValue = e })
-                                      .Where(f => modelSelectionPredicate(currentRow, f.Model))
-                                      .Select(f => f.EstimatedValue).DefaultIfEmpty(double.NaN);
-
-        yield return AggregateEstimatedValues(filteredEstimates);
-      }
-    }
-
-    private double AggregateEstimatedValues(IEnumerable<double> estimatedValuesVector) {
-      if (AverageModelEstimates)
-        return estimatedValuesVector.Average();
-      else
-        return estimatedValuesVector.Sum();
-    }
+        double weightsSum = 0.0;
+        double filteredEstimatesSum = 0.0;
+
+        for (int m = 0; m < models.Count; m++) {
+          estimatedValueEnumerator.MoveNext();
+          var model = models[m];
+          if (!modelSelectionPredicate(currentRow, model)) continue;
+
+          filteredEstimatesSum += estimatedValueEnumerator.Current;
+          weightsSum += modelWeights[m];
+        }
+
+        if (AverageModelEstimates)
+          yield return filteredEstimatesSum / weightsSum;
+        else
+          yield return filteredEstimatesSum;
+      }
+    }
+
+    #endregion
 
     public event EventHandler Changed;
@@ -194,12 +211,5 @@
         handler(this, EventArgs.Empty);
     }
-    #endregion
-
-    #region IRegressionModel Members
-    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
-      foreach (var estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)) {
-        yield return AggregateEstimatedValues(estimatedValuesVector.DefaultIfEmpty(double.NaN));
-      }
-    }
+
 
     public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
@@ -209,5 +219,4 @@
       return CreateRegressionSolution(problemData);
     }
-    #endregion
   }
 }
