Index: /branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- /branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs	(revision 17995)
+++ /branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs	(revision 17996)
@@ -26,5 +26,4 @@
 using HeuristicLab.Algorithms.DataAnalysis;
 using HeuristicLab.MainForm;
-using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Problems.DataAnalysis.Views;
 
@@ -44,4 +43,5 @@
     private IRegressionSolution CreateLinearRegressionSolution() {
       if (Content == null) throw new InvalidOperationException();
+      double rmse, cvRmsError;
       var problemData = (IRegressionProblemData)ProblemData.Clone();
       if (!problemData.TrainingIndices.Any()) return null; // don't create an LR model if the problem does not have a training set (e.g. loaded into an existing model)
@@ -87,14 +87,7 @@
       newProblemData.TestPartition.End = problemData.TestPartition.End;
 
-      try {
-        var solution = LinearRegression.CreateSolution(newProblemData, out _, out _, out _);
-        solution.Name = "Baseline (linear subset)";
-        return solution;
-      } catch (NotSupportedException e) {
-        ErrorHandling.ShowErrorDialog("Could not create a linear regression solution.", e);
-      } catch (ArgumentException e) {
-        ErrorHandling.ShowErrorDialog("Could not create a linear regression solution.", e);
-      }
-      return null;
+      var solution = LinearRegression.CreateLinearRegressionSolution(newProblemData, out rmse, out cvRmsError);
+      solution.Name = "Baseline (linear subset)";
+      return solution;
     }
 
@@ -106,6 +99,5 @@
       if (Content.Model.SymbolicExpressionTree.IterateNodesPrefix().OfType<LaggedVariableTreeNode>().Any()) yield break;
 
-      var linearRegressionSolution = CreateLinearRegressionSolution();
-      if (linearRegressionSolution != null) yield return linearRegressionSolution;
+      yield return CreateLinearRegressionSolution();
     }
   }
Index: /branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- /branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 17995)
+++ /branches/3087_Ceres_Integration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 17996)
@@ -29,5 +29,4 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.Optimization;
-using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -75,5 +74,5 @@
     }
 
-    private readonly List<IRegressionSolution> solutions = new List<IRegressionSolution>();
+    private readonly IList<IRegressionSolution> solutions = new List<IRegressionSolution>();
     public IEnumerable<IRegressionSolution> Solutions {
       get { return solutions.AsEnumerable(); }
@@ -104,5 +103,8 @@
         solutions.Clear(); // remove all
         solutions.Add(Content); // re-add the first solution
-        solutions.AddRange(CreateBaselineSolutions());
+        // and recalculate all other solutions
+        foreach (var sol in CreateBaselineSolutions()) {
+          solutions.Add(sol);
+        }
         UpdateChart();
       }
@@ -114,5 +116,8 @@
         solutions.Clear(); // remove all
         solutions.Add(Content); // re-add the first solution
-        solutions.AddRange(CreateBaselineSolutions());
+        // and recalculate all other solutions
+        foreach (var sol in CreateBaselineSolutions()) {
+          solutions.Add(sol);
+        }
         UpdateChart();
       }
@@ -244,9 +249,7 @@
     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))
+        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))
+        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":
@@ -286,14 +289,9 @@
 
     protected virtual IEnumerable<IRegressionSolution> CreateBaselineSolutions() {
-      var constantSolution = CreateConstantSolution();
-      if (constantSolution != null) yield return CreateConstantSolution();
-
-      var linearRegressionSolution = CreateLinearSolution();
-      if (linearRegressionSolution != null) yield return CreateLinearSolution();
+      yield return CreateConstantSolution();
+      yield return CreateLinearSolution();
     }
 
     private IRegressionSolution CreateConstantSolution() {
-      if (!ProblemData.TrainingIndices.Any()) return null;
-
       double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average();
       var model = new ConstantModel(averageTrainingTarget, ProblemData.TargetVariable);
@@ -303,14 +301,8 @@
     }
     private IRegressionSolution CreateLinearSolution() {
-      try {
-        var solution = LinearRegression.CreateSolution((IRegressionProblemData)ProblemData.Clone(), out _, out _, out _);
-        solution.Name = "Baseline (linear)";
-        return solution;
-      } catch (NotSupportedException e) {
-        ErrorHandling.ShowErrorDialog("Could not create a linear regression solution.", e);
-      } catch (ArgumentException e) {
-        ErrorHandling.ShowErrorDialog("Could not create a linear regression solution.", e);
-      }
-      return null;
+      double rmsError, cvRmsError;
+      var solution = LinearRegression.CreateLinearRegressionSolution((IRegressionProblemData)ProblemData.Clone(), out rmsError, out cvRmsError);
+      solution.Name = "Baseline (linear)";
+      return solution;
     }
 
