Index: stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 13974)
+++ stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 13976)
@@ -195,4 +195,10 @@
     <Compile Include="ProblemDataView.Designer.cs">
       <DependentUpon>ProblemDataView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Regression\RegressionEnsembleSolutionModelWeightsView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Regression\RegressionEnsembleSolutionModelWeightsView.Designer.cs">
+      <DependentUpon>RegressionEnsembleSolutionModelWeightsView.cs</DependentUpon>
     </Compile>
     <Compile Include="Regression\RegressionFeatureCorrelationView.cs">
Index: stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelView.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelView.cs	(revision 13974)
+++ stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelView.cs	(revision 13976)
@@ -63,9 +63,14 @@
       protected override void SetEnabledStateOfControls() {
         base.SetEnabledStateOfControls();
-        addButton.Enabled = Content != null && !Content.IsReadOnly && !Locked;
-        removeButton.Enabled = Content != null && !Content.IsReadOnly && !Locked && itemsListView.SelectedItems.Count > 0;
+        addButton.Enabled = false;
+        removeButton.Enabled = Content != null && !Content.IsReadOnly && !Locked && !ReadOnly && itemsListView.SelectedItems.Count > 0;
         itemsListView.Enabled = Content != null && !Locked;
         detailsGroupBox.Enabled = Content != null && itemsListView.SelectedItems.Count == 1;
+        sortAscendingButton.Enabled = false;
+        sortDescendingButton.Enabled = false;
       }
+
+      //forbid sorting
+      protected override void SortItemsListView(SortOrder sortOrder) { }
 
       protected override void itemsListView_DragEnter(object sender, DragEventArgs e) {
Index: stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.Designer.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.Designer.cs	(revision 13976)
+++ stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.Designer.cs	(revision 13976)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class RegressionEnsembleSolutionModelWeightsView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.arrayView = new HeuristicLab.Data.Views.StringConvertibleArrayView();
+      this.averageEstimatesCheckBox = new System.Windows.Forms.CheckBox();
+      this.SuspendLayout();
+      // 
+      // arrayView
+      // 
+      this.arrayView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.arrayView.Caption = "StringConvertibleArray View";
+      this.arrayView.Content = null;
+      this.arrayView.Location = new System.Drawing.Point(3, 27);
+      this.arrayView.Name = "arrayView";
+      this.arrayView.ReadOnly = false;
+      this.arrayView.Size = new System.Drawing.Size(711, 508);
+      this.arrayView.TabIndex = 0;
+      // 
+      // averageEstimatesCheckBox
+      // 
+      this.averageEstimatesCheckBox.AutoSize = true;
+      this.averageEstimatesCheckBox.Location = new System.Drawing.Point(4, 4);
+      this.averageEstimatesCheckBox.Name = "averageEstimatesCheckBox";
+      this.averageEstimatesCheckBox.Size = new System.Drawing.Size(150, 17);
+      this.averageEstimatesCheckBox.TabIndex = 1;
+      this.averageEstimatesCheckBox.Text = "Average Estimated Values";
+      this.averageEstimatesCheckBox.UseVisualStyleBackColor = true;
+      this.averageEstimatesCheckBox.CheckedChanged += new System.EventHandler(this.averageEstimatesCheckBox_CheckedChanged);
+      // 
+      // RegressionEnsembleSolutionModelWeightsView
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.averageEstimatesCheckBox);
+      this.Controls.Add(this.arrayView);
+      this.Name = "RegressionEnsembleSolutionModelWeightsView";
+      this.Size = new System.Drawing.Size(717, 538);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private Data.Views.StringConvertibleArrayView arrayView;
+    private System.Windows.Forms.CheckBox averageEstimatesCheckBox;
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.cs	(revision 13976)
+++ stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelWeightsView.cs	(revision 13976)
@@ -0,0 +1,119 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Ensemble Solutions Weights")]
+  [Content(typeof(RegressionEnsembleSolution), false)]
+  internal sealed partial class RegressionEnsembleSolutionModelWeightsView : DataAnalysisSolutionEvaluationView {
+    public override System.Drawing.Image ViewImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Properties; }
+    }
+
+    public RegressionEnsembleSolutionModelWeightsView() {
+      InitializeComponent();
+    }
+
+    public new RegressionEnsembleSolution Content {
+      get { return (RegressionEnsembleSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      averageEstimatesCheckBox.Enabled = Content != null && !Locked && !ReadOnly;
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Model.Changed += Content_ModelChanged;
+    }
+    private void RegisterArrayEvents(DoubleArray array) {
+      array.ItemChanged += DoubleArray_Changed;
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.Model.Changed -= Content_ModelChanged;
+      base.DeregisterContentEvents();
+    }
+    private void DeregisterArrayEvents(DoubleArray array) {
+      array.ItemChanged -= DoubleArray_Changed;
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null) {
+        if (arrayView.Content != null) DeregisterArrayEvents((DoubleArray)arrayView.Content);
+        var array = new DoubleArray(Content.Model.ModelWeights.ToArray());
+        array.Resizable = false;
+        array.ElementNames = Content.RegressionSolutions.Select(s => s.Name);
+
+        RegisterArrayEvents(array);
+
+        arrayView.Content = array;
+        arrayView.Locked = Content.ProblemData == RegressionEnsembleProblemData.EmptyProblemData;
+        averageEstimatesCheckBox.Checked = Content.Model.AverageModelEstimates;
+      } else {
+        arrayView.Content = null;
+        averageEstimatesCheckBox.Checked = false;
+      }
+    }
+
+    private void Content_ModelChanged(object sender, EventArgs eventArgs) {
+      var array = (DoubleArray)arrayView.Content;
+      var modelWeights = Content.Model.ModelWeights.ToList();
+
+      if (array.Length != modelWeights.Count) {
+        DeregisterArrayEvents(array);
+        array = new DoubleArray(Content.Model.ModelWeights.ToArray());
+        array.Resizable = false;
+        RegisterArrayEvents(array);
+      }
+
+      for (int i = 0; i < modelWeights.Count; i++)
+        array[i] = modelWeights[i];
+
+      array.ElementNames = Content.RegressionSolutions.Select(s => s.Name);
+      averageEstimatesCheckBox.Checked = Content.Model.AverageModelEstimates;
+    }
+
+    private void DoubleArray_Changed(object sender, EventArgs<int> eventArgs) {
+      var array = (DoubleArray)arrayView.Content;
+      var index = eventArgs.Value;
+      var newWeight = array[index];
+      var model = Content.Model.Models.ElementAt(index);
+
+      Content.Model.SetModelWeight(model, newWeight);
+    }
+
+    private void averageEstimatesCheckBox_CheckedChanged(object sender, EventArgs e) {
+      if (Content == null) return;
+      Content.Model.AverageModelEstimates = averageEstimatesCheckBox.Checked;
+    }
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 13974)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 13976)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -32,5 +33,5 @@
   [StorableClass]
   [Item("RegressionEnsembleModel", "A regression model that contains an ensemble of multiple regression models")]
-  public class RegressionEnsembleModel : NamedItem, IRegressionEnsembleModel {
+  public sealed class RegressionEnsembleModel : NamedItem, IRegressionEnsembleModel {
 
     private List<IRegressionModel> models;
@@ -45,4 +46,27 @@
     }
 
+    private List<double> modelWeights;
+    public IEnumerable<double> ModelWeights {
+      get { return modelWeights; }
+    }
+
+    [Storable(Name = "ModelWeights")]
+    private IEnumerable<double> StorableModelWeights {
+      get { return modelWeights; }
+      set { modelWeights = value.ToList(); }
+    }
+
+    [Storable]
+    private bool averageModelEstimates = true;
+    public bool AverageModelEstimates {
+      get { return averageModelEstimates; }
+      set {
+        if (averageModelEstimates != value) {
+          averageModelEstimates = value;
+          OnChanged();
+        }
+      }
+    }
+
     #region backwards compatiblity 3.3.5
     [Storable(Name = "models", AllowOneWay = true)]
@@ -52,36 +76,86 @@
     #endregion
 
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility 3.3.14
+      #region Backwards compatible code, remove with 3.4
+      if (modelWeights == null || !modelWeights.Any())
+        modelWeights = new List<double>(models.Select(m => 1.0));
+      #endregion
+    }
+
     [StorableConstructor]
-    protected RegressionEnsembleModel(bool deserializing) : base(deserializing) { }
-    protected RegressionEnsembleModel(RegressionEnsembleModel original, Cloner cloner)
+    private RegressionEnsembleModel(bool deserializing) : base(deserializing) { }
+    private RegressionEnsembleModel(RegressionEnsembleModel original, Cloner cloner)
       : base(original, cloner) {
-      this.models = original.Models.Select(m => cloner.Clone(m)).ToList();
+      this.models = original.Models.Select(cloner.Clone).ToList();
+      this.modelWeights = new List<double>(original.ModelWeights);
+      this.averageModelEstimates = original.averageModelEstimates;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RegressionEnsembleModel(this, cloner);
     }
 
     public RegressionEnsembleModel() : this(Enumerable.Empty<IRegressionModel>()) { }
-    public RegressionEnsembleModel(IEnumerable<IRegressionModel> models)
+    public RegressionEnsembleModel(IEnumerable<IRegressionModel> models) : this(models, models.Select(m => 1.0)) { }
+    public RegressionEnsembleModel(IEnumerable<IRegressionModel> models, IEnumerable<double> modelWeights)
       : base() {
       this.name = ItemName;
       this.description = ItemDescription;
+
+
       this.models = new List<IRegressionModel>(models);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new RegressionEnsembleModel(this, cloner);
-    }
-
-    #region IRegressionEnsembleModel Members
+      this.modelWeights = new List<double>(modelWeights);
+    }
 
     public void Add(IRegressionModel model) {
+      Add(model, 1.0);
+    }
+    public void Add(IRegressionModel model, double weight) {
       models.Add(model);
-    }
+      modelWeights.Add(weight);
+      OnChanged();
+    }
+
+    public void AddRange(IEnumerable<IRegressionModel> models) {
+      AddRange(models, models.Select(m => 1.0));
+    }
+    public void AddRange(IEnumerable<IRegressionModel> models, IEnumerable<double> weights) {
+      this.models.AddRange(models);
+      modelWeights.AddRange(weights);
+      OnChanged();
+    }
+
     public void Remove(IRegressionModel model) {
-      models.Remove(model);
-    }
-
+      var index = models.IndexOf(model);
+      models.RemoveAt(index);
+      modelWeights.RemoveAt(index);
+      OnChanged();
+    }
+    public void RemoveRange(IEnumerable<IRegressionModel> models) {
+      foreach (var model in models) {
+        var index = this.models.IndexOf(model);
+        this.models.RemoveAt(index);
+        modelWeights.RemoveAt(index);
+      }
+      OnChanged();
+    }
+
+    public double GetModelWeight(IRegressionModel model) {
+      var index = models.IndexOf(model);
+      return modelWeights[index];
+    }
+    public void SetModelWeight(IRegressionModel model, double weight) {
+      var index = models.IndexOf(model);
+      modelWeights[index] = weight;
+      OnChanged();
+    }
+
+    #region evaluation
     public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
       var estimatedValuesEnumerators = (from model in models
-                                        select model.GetEstimatedValues(dataset, rows).GetEnumerator())
-                                       .ToList();
+                                        let weight = GetModelWeight(model)
+                                        select model.GetEstimatedValues(dataset, rows).Select(e => weight * e)
+                                        .GetEnumerator()).ToList();
 
       while (estimatedValuesEnumerators.All(en => en.MoveNext())) {
@@ -91,22 +165,58 @@
     }
 
+    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();
+
+      while (rowsEnumerator.MoveNext() & estimatedValuesEnumerators.MoveNext()) {
+        var estimatedValueEnumerator = estimatedValuesEnumerators.Current.GetEnumerator();
+        int currentRow = rowsEnumerator.Current;
+        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
 
-    #region IRegressionModel Members
-
-    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
-      foreach (var estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)) {
-        yield return estimatedValuesVector.Average();
-      }
-    }
+    public event EventHandler Changed;
+    private void OnChanged() {
+      var handler = Changed;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
 
     public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
-      return new RegressionEnsembleSolution(this.Models, new RegressionEnsembleProblemData(problemData));
+      return new RegressionEnsembleSolution(this, new RegressionEnsembleProblemData(problemData));
     }
     IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
       return CreateRegressionSolution(problemData);
     }
-
-    #endregion
   }
 }
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs	(revision 13974)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs	(revision 13976)
@@ -79,4 +79,6 @@
         }
       }
+
+      RegisterModelEvents();
       RegisterRegressionSolutionsEventHandler();
     }
@@ -93,8 +95,10 @@
       }
 
+      evaluationCache = new Dictionary<int, double>(original.ProblemData.Dataset.Rows);
       trainingEvaluationCache = new Dictionary<int, double>(original.ProblemData.TrainingIndices.Count());
       testEvaluationCache = new Dictionary<int, double>(original.ProblemData.TestIndices.Count());
 
       regressionSolutions = cloner.Clone(original.regressionSolutions);
+      RegisterModelEvents();
       RegisterRegressionSolutionsEventHandler();
     }
@@ -106,50 +110,42 @@
       regressionSolutions = new ItemCollection<IRegressionSolution>();
 
+      RegisterModelEvents();
       RegisterRegressionSolutionsEventHandler();
     }
 
     public RegressionEnsembleSolution(IRegressionProblemData problemData)
-      : this(Enumerable.Empty<IRegressionModel>(), problemData) {
-    }
-
-    public RegressionEnsembleSolution(IEnumerable<IRegressionModel> models, IRegressionProblemData problemData)
-      : this(models, problemData,
-             models.Select(m => (IntRange)problemData.TrainingPartition.Clone()),
-             models.Select(m => (IntRange)problemData.TestPartition.Clone())
-      ) { }
-
-    public RegressionEnsembleSolution(IEnumerable<IRegressionModel> models, IRegressionProblemData problemData, IEnumerable<IntRange> trainingPartitions, IEnumerable<IntRange> testPartitions)
-      : base(new RegressionEnsembleModel(Enumerable.Empty<IRegressionModel>()), new RegressionEnsembleProblemData(problemData)) {
-      this.trainingPartitions = new Dictionary<IRegressionModel, IntRange>();
-      this.testPartitions = new Dictionary<IRegressionModel, IntRange>();
-      this.regressionSolutions = new ItemCollection<IRegressionSolution>();
-
-      List<IRegressionSolution> solutions = new List<IRegressionSolution>();
-      var modelEnumerator = models.GetEnumerator();
-      var trainingPartitionEnumerator = trainingPartitions.GetEnumerator();
-      var testPartitionEnumerator = testPartitions.GetEnumerator();
-
-      while (modelEnumerator.MoveNext() & trainingPartitionEnumerator.MoveNext() & testPartitionEnumerator.MoveNext()) {
-        var p = (IRegressionProblemData)problemData.Clone();
-        p.TrainingPartition.Start = trainingPartitionEnumerator.Current.Start;
-        p.TrainingPartition.End = trainingPartitionEnumerator.Current.End;
-        p.TestPartition.Start = testPartitionEnumerator.Current.Start;
-        p.TestPartition.End = testPartitionEnumerator.Current.End;
-
-        solutions.Add(modelEnumerator.Current.CreateRegressionSolution(p));
-      }
-      if (modelEnumerator.MoveNext() | trainingPartitionEnumerator.MoveNext() | testPartitionEnumerator.MoveNext()) {
-        throw new ArgumentException();
-      }
-
+      : this(new RegressionEnsembleModel(), problemData) {
+    }
+
+    public RegressionEnsembleSolution(IRegressionEnsembleModel model, IRegressionProblemData problemData)
+      : base(model, new RegressionEnsembleProblemData(problemData)) {
+      trainingPartitions = new Dictionary<IRegressionModel, IntRange>();
+      testPartitions = new Dictionary<IRegressionModel, IntRange>();
+      regressionSolutions = new ItemCollection<IRegressionSolution>();
+
+      evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows);
       trainingEvaluationCache = new Dictionary<int, double>(problemData.TrainingIndices.Count());
       testEvaluationCache = new Dictionary<int, double>(problemData.TestIndices.Count());
 
+
+      var solutions = model.Models.Select(m => m.CreateRegressionSolution((IRegressionProblemData)problemData.Clone()));
+      foreach (var solution in solutions) {
+        regressionSolutions.Add(solution);
+        trainingPartitions.Add(solution.Model, solution.ProblemData.TrainingPartition);
+        testPartitions.Add(solution.Model, solution.ProblemData.TestPartition);
+      }
+
+      RecalculateResults();
+      RegisterModelEvents();
       RegisterRegressionSolutionsEventHandler();
-      regressionSolutions.AddRange(solutions);
-    }
+    }
+
 
     public override IDeepCloneable Clone(Cloner cloner) {
       return new RegressionEnsembleSolution(this, cloner);
+    }
+
+    private void RegisterModelEvents() {
+      Model.Changed += Model_Changed;
     }
     private void RegisterRegressionSolutionsEventHandler() {
@@ -168,6 +164,7 @@
         var rows = ProblemData.TrainingIndices;
         var rowsToEvaluate = rows.Except(trainingEvaluationCache.Keys);
+
         var rowsEnumerator = rowsToEvaluate.GetEnumerator();
-        var valuesEnumerator = GetEstimatedValues(rowsToEvaluate, (r, m) => RowIsTrainingForModel(r, m) && !RowIsTestForModel(r, m)).GetEnumerator();
+        var valuesEnumerator = Model.GetEstimatedValues(ProblemData.Dataset, rowsToEvaluate, (r, m) => RowIsTrainingForModel(r, m) && !RowIsTestForModel(r, m)).GetEnumerator();
 
         while (rowsEnumerator.MoveNext() & valuesEnumerator.MoveNext()) {
@@ -184,5 +181,5 @@
         var rowsToEvaluate = rows.Except(testEvaluationCache.Keys);
         var rowsEnumerator = rowsToEvaluate.GetEnumerator();
-        var valuesEnumerator = GetEstimatedValues(rowsToEvaluate, RowIsTestForModel).GetEnumerator();
+        var valuesEnumerator = Model.GetEstimatedValues(ProblemData.Dataset, rowsToEvaluate, RowIsTestForModel).GetEnumerator();
 
         while (rowsEnumerator.MoveNext() & valuesEnumerator.MoveNext()) {
@@ -193,27 +190,8 @@
       }
     }
-
-    private IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows, Func<int, IRegressionModel, bool> modelSelectionPredicate) {
-      var estimatedValuesEnumerators = (from model in Model.Models
-                                        select new { Model = model, EstimatedValuesEnumerator = model.GetEstimatedValues(ProblemData.Dataset, rows).GetEnumerator() })
-                                       .ToList();
-      var rowsEnumerator = rows.GetEnumerator();
-      // aggregate to make sure that MoveNext is called for all enumerators 
-      while (rowsEnumerator.MoveNext() & estimatedValuesEnumerators.Select(en => en.EstimatedValuesEnumerator.MoveNext()).Aggregate(true, (acc, b) => acc & b)) {
-        int currentRow = rowsEnumerator.Current;
-
-        var selectedEnumerators = from pair in estimatedValuesEnumerators
-                                  where modelSelectionPredicate(currentRow, pair.Model)
-                                  select pair.EstimatedValuesEnumerator;
-
-        yield return AggregateEstimatedValues(selectedEnumerators.Select(x => x.Current));
-      }
-    }
-
     private bool RowIsTrainingForModel(int currentRow, IRegressionModel model) {
       return trainingPartitions == null || !trainingPartitions.ContainsKey(model) ||
               (trainingPartitions[model].Start <= currentRow && currentRow < trainingPartitions[model].End);
     }
-
     private bool RowIsTestForModel(int currentRow, IRegressionModel model) {
       return testPartitions == null || !testPartitions.ContainsKey(model) ||
@@ -224,7 +202,5 @@
       var rowsToEvaluate = rows.Except(evaluationCache.Keys);
       var rowsEnumerator = rowsToEvaluate.GetEnumerator();
-      var valuesEnumerator = (from xs in GetEstimatedValueVectors(ProblemData.Dataset, rowsToEvaluate)
-                              select AggregateEstimatedValues(xs))
-                             .GetEnumerator();
+      var valuesEnumerator = Model.GetEstimatedValues(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();
 
       while (rowsEnumerator.MoveNext() & valuesEnumerator.MoveNext()) {
@@ -235,18 +211,6 @@
     }
 
-    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
-      if (!Model.Models.Any()) yield break;
-      var estimatedValuesEnumerators = (from model in Model.Models
-                                        select model.GetEstimatedValues(dataset, rows).GetEnumerator())
-                                       .ToList();
-
-      while (estimatedValuesEnumerators.All(en => en.MoveNext())) {
-        yield return from enumerator in estimatedValuesEnumerators
-                     select enumerator.Current;
-      }
-    }
-
-    private double AggregateEstimatedValues(IEnumerable<double> estimatedValues) {
-      return estimatedValues.DefaultIfEmpty(double.NaN).Average();
+    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IEnumerable<int> rows) {
+      return Model.GetEstimatedValueVectors(ProblemData.Dataset, rows);
     }
     #endregion
@@ -282,53 +246,56 @@
     }
 
-    public void AddRegressionSolutions(IEnumerable<IRegressionSolution> solutions) {
-      regressionSolutions.AddRange(solutions);
+    private void Model_Changed(object sender, EventArgs e) {
+      var modelSet = new HashSet<IRegressionModel>(Model.Models);
+      foreach (var model in Model.Models) {
+        if (!trainingPartitions.ContainsKey(model)) trainingPartitions.Add(model, ProblemData.TrainingPartition);
+        if (!testPartitions.ContainsKey(model)) testPartitions.Add(model, ProblemData.TrainingPartition);
+      }
+      foreach (var model in trainingPartitions.Keys) {
+        if (modelSet.Contains(model)) continue;
+        trainingPartitions.Remove(model);
+        testPartitions.Remove(model);
+      }
 
       trainingEvaluationCache.Clear();
       testEvaluationCache.Clear();
       evaluationCache.Clear();
+
+      OnModelChanged();
+    }
+
+    public void AddRegressionSolutions(IEnumerable<IRegressionSolution> solutions) {
+      regressionSolutions.AddRange(solutions);
     }
     public void RemoveRegressionSolutions(IEnumerable<IRegressionSolution> solutions) {
       regressionSolutions.RemoveRange(solutions);
-
-      trainingEvaluationCache.Clear();
-      testEvaluationCache.Clear();
-      evaluationCache.Clear();
     }
 
     private void regressionSolutions_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRegressionSolution> e) {
-      foreach (var solution in e.Items) AddRegressionSolution(solution);
-      RecalculateResults();
+      foreach (var solution in e.Items) {
+        trainingPartitions.Add(solution.Model, solution.ProblemData.TrainingPartition);
+        testPartitions.Add(solution.Model, solution.ProblemData.TestPartition);
+      }
+      Model.AddRange(e.Items.Select(s => s.Model));
     }
     private void regressionSolutions_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRegressionSolution> e) {
-      foreach (var solution in e.Items) RemoveRegressionSolution(solution);
-      RecalculateResults();
+      foreach (var solution in e.Items) {
+        trainingPartitions.Remove(solution.Model);
+        testPartitions.Remove(solution.Model);
+      }
+      Model.RemoveRange(e.Items.Select(s => s.Model));
     }
     private void regressionSolutions_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRegressionSolution> e) {
-      foreach (var solution in e.OldItems) RemoveRegressionSolution(solution);
-      foreach (var solution in e.Items) AddRegressionSolution(solution);
-      RecalculateResults();
-    }
-
-    private void AddRegressionSolution(IRegressionSolution solution) {
-      if (Model.Models.Contains(solution.Model)) throw new ArgumentException();
-      Model.Add(solution.Model);
-      trainingPartitions[solution.Model] = solution.ProblemData.TrainingPartition;
-      testPartitions[solution.Model] = solution.ProblemData.TestPartition;
-
-      trainingEvaluationCache.Clear();
-      testEvaluationCache.Clear();
-      evaluationCache.Clear();
-    }
-
-    private void RemoveRegressionSolution(IRegressionSolution solution) {
-      if (!Model.Models.Contains(solution.Model)) throw new ArgumentException();
-      Model.Remove(solution.Model);
-      trainingPartitions.Remove(solution.Model);
-      testPartitions.Remove(solution.Model);
-
-      trainingEvaluationCache.Clear();
-      testEvaluationCache.Clear();
-      evaluationCache.Clear();
+      foreach (var solution in e.OldItems) {
+        trainingPartitions.Remove(solution.Model);
+        testPartitions.Remove(solution.Model);
+      }
+      Model.RemoveRange(e.OldItems.Select(s => s.Model));
+
+      foreach (var solution in e.Items) {
+        trainingPartitions.Add(solution.Model, solution.ProblemData.TrainingPartition);
+        testPartitions.Add(solution.Model, solution.ProblemData.TestPartition);
+      }
+      Model.AddRange(e.Items.Select(s => s.Model));
     }
   }
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEnsembleModel.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEnsembleModel.cs	(revision 13974)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEnsembleModel.cs	(revision 13976)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -20,11 +20,28 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 namespace HeuristicLab.Problems.DataAnalysis {
   public interface IRegressionEnsembleModel : IRegressionModel {
     void Add(IRegressionModel model);
+    void Add(IRegressionModel model, double weight);
+    void AddRange(IEnumerable<IRegressionModel> models);
+    void AddRange(IEnumerable<IRegressionModel> models, IEnumerable<double> weights);
+
     void Remove(IRegressionModel model);
+    void RemoveRange(IEnumerable<IRegressionModel> models);
+
     IEnumerable<IRegressionModel> Models { get; }
+    IEnumerable<double> ModelWeights { get; }
+
+    double GetModelWeight(IRegressionModel model);
+    void SetModelWeight(IRegressionModel model, double weight);
+
+    bool AverageModelEstimates { get; set; }
+
+    event EventHandler Changed;
+
     IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows);
+    IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows, Func<int, IRegressionModel, bool> modelSelectionPredicate);
   }
 }
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEnsembleSolution.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEnsembleSolution.cs	(revision 13974)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEnsembleSolution.cs	(revision 13976)
@@ -27,5 +27,5 @@
     new RegressionEnsembleProblemData ProblemData { get; set; }
     IItemCollection<IRegressionSolution> RegressionSolutions { get; }
-    IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows);
+    IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IEnumerable<int> rows);
   }
 }
