Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs	(revision 13921)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs	(revision 13941)
@@ -32,12 +32,6 @@
   [Item("Constant Regression Model", "A model that always returns the same constant value regardless of the presented input data.")]
   [Obsolete]
-  public class ConstantRegressionModel : NamedItem, IRegressionModel, IStringConvertibleValue {
-    public IEnumerable<string> VariablesUsedForPrediction { get { return Enumerable.Empty<string>(); } }
-
-    [Storable]
-    private readonly string targetVariable;
-    public string TargetVariable {
-      get { return targetVariable; }
-    }
+  public class ConstantRegressionModel : RegressionModel, IStringConvertibleValue {
+    public override IEnumerable<string> VariablesUsedForPrediction { get { return Enumerable.Empty<string>(); } }
 
     [Storable]
@@ -53,5 +47,4 @@
       : base(original, cloner) {
       this.constant = original.constant;
-      this.targetVariable = original.targetVariable;
     }
 
@@ -59,17 +52,16 @@
 
     public ConstantRegressionModel(double constant, string targetVariable = "Target")
-      : base() {
+      : base(targetVariable) {
       this.name = ItemName;
       this.description = ItemDescription;
       this.constant = constant;
       this.ReadOnly = true; // changing a constant regression model is not supported
-      this.targetVariable = targetVariable;
     }
 
-    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
+    public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
       return rows.Select(row => Constant);
     }
 
-    public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
+    public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
       return new ConstantRegressionSolution(new ConstantModel(constant), new RegressionProblemData(problemData));
     }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 13921)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 13941)
@@ -33,6 +33,6 @@
   [StorableClass]
   [Item("RegressionEnsembleModel", "A regression model that contains an ensemble of multiple regression models")]
-  public sealed class RegressionEnsembleModel : NamedItem, IRegressionEnsembleModel {
-    public IEnumerable<string> VariablesUsedForPrediction {
+  public sealed class RegressionEnsembleModel : RegressionModel, IRegressionEnsembleModel {
+    public override IEnumerable<string> VariablesUsedForPrediction {
       get { return models.SelectMany(x => x.VariablesUsedForPrediction).Distinct().OrderBy(x => x); }
     }
@@ -41,10 +41,4 @@
     public IEnumerable<IRegressionModel> Models {
       get { return new List<IRegressionModel>(models); }
-    }
-
-    [Storable]
-    private readonly string target;
-    public string TargetVariable {
-      get { return models.First().TargetVariable; }
     }
 
@@ -109,17 +103,21 @@
     public RegressionEnsembleModel(IEnumerable<IRegressionModel> models) : this(models, models.Select(m => 1.0)) { }
     public RegressionEnsembleModel(IEnumerable<IRegressionModel> models, IEnumerable<double> modelWeights)
-      : base() {
+      : base(string.Empty) {
       this.name = ItemName;
       this.description = ItemDescription;
 
-
       this.models = new List<IRegressionModel>(models);
       this.modelWeights = new List<double>(modelWeights);
+
+      if (this.models.Any()) this.TargetVariable = this.models.First().TargetVariable;
     }
 
     public void Add(IRegressionModel model) {
+      if (string.IsNullOrEmpty(TargetVariable)) TargetVariable = model.TargetVariable;
       Add(model, 1.0);
     }
     public void Add(IRegressionModel model, double weight) {
+      if (string.IsNullOrEmpty(TargetVariable)) TargetVariable = model.TargetVariable;
+
       models.Add(model);
       modelWeights.Add(weight);
@@ -131,4 +129,6 @@
     }
     public void AddRange(IEnumerable<IRegressionModel> models, IEnumerable<double> weights) {
+      if (string.IsNullOrEmpty(TargetVariable)) TargetVariable = models.First().TargetVariable;
+
       this.models.AddRange(models);
       modelWeights.AddRange(weights);
@@ -140,4 +140,6 @@
       models.RemoveAt(index);
       modelWeights.RemoveAt(index);
+
+      if (!models.Any()) TargetVariable = string.Empty;
       OnChanged();
     }
@@ -148,4 +150,6 @@
         modelWeights.RemoveAt(index);
       }
+
+      if (!models.Any()) TargetVariable = string.Empty;
       OnChanged();
     }
@@ -174,5 +178,5 @@
     }
 
-    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
+    public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
       double weightsSum = modelWeights.Sum();
       var summedEstimates = from estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)
@@ -222,9 +226,6 @@
 
 
-    public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
+    public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
       return new RegressionEnsembleSolution(this, new RegressionEnsembleProblemData(problemData));
-    }
-    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
-      return CreateRegressionSolution(problemData);
     }
   }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionModel.cs	(revision 13941)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionModel.cs	(revision 13941)
@@ -0,0 +1,61 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  [Item("Regression Model", "Base class for all regression models.")]
+  public abstract class RegressionModel : DataAnalysisModel, IRegressionModel {
+    [Storable]
+    private string targetVariable;
+    public string TargetVariable {
+      get { return targetVariable; }
+      protected set { targetVariable = value; }
+    }
+
+    protected RegressionModel(bool deserializing) : base(deserializing) { }
+
+    protected RegressionModel(RegressionModel original, Cloner cloner)
+      : base(original, cloner) {
+      this.targetVariable = original.targetVariable;
+    }
+
+    protected RegressionModel(string targetVariable)
+      : base("Regression Model") {
+      this.targetVariable = targetVariable;
+    }
+    protected RegressionModel(string targetVariable, string name)
+      : base(name) {
+      this.targetVariable = targetVariable;
+    }
+    protected RegressionModel(string targetVariable, string name, string description)
+      : base(name, description) {
+      this.targetVariable = targetVariable;
+    }
+
+    public abstract IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows);
+    public abstract IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData);
+  }
+}
