Index: trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
===================================================================
--- trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 16446)
+++ trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 16448)
@@ -41,5 +41,6 @@
   [StorableClass]
   public sealed class LinearRegression : FixedDataAnalysisAlgorithm<IRegressionProblem> {
-    private const string LinearRegressionModelResultName = "Linear regression solution";
+    private const string SolutionResultName = "Linear regression solution";
+    private const string ConfidenceSolutionResultName = "Solution with prediction intervals";
 
     [StorableConstructor]
@@ -62,6 +63,14 @@
     protected override void Run(CancellationToken cancellationToken) {
       double rmsError, cvRmsError;
+      // produce both solutions, to allow symbolic manipulation of LR solutions as well
+      // as the calculation of prediction intervals.
+      // There is no clean way to implement the new model class for LR as a symbolic model.
       var solution = CreateSolution(Problem.ProblemData, out rmsError, out cvRmsError);
-      Results.Add(new Result(LinearRegressionModelResultName, "The linear regression solution.", solution));
+#pragma warning disable 168, 3021
+      var symbolicSolution = CreateLinearRegressionSolution(Problem.ProblemData, out rmsError, out cvRmsError);
+#pragma warning restore 168, 3021
+      Results.Add(new Result(SolutionResultName, "The linear regression solution.", symbolicSolution));
+      Results.Add(new Result(ConfidenceSolutionResultName, "Linear regression solution with parameter covariance matrix " +
+                                                           "and calculation of prediction intervals", solution));
       Results.Add(new Result("Root mean square error", "The root of the mean of squared errors of the linear regression solution on the training set.", new DoubleValue(rmsError)));
       Results.Add(new Result("Estimated root mean square error (cross-validation)", "The estimated root of the mean of squared errors of the linear regression solution via cross validation.", new DoubleValue(cvRmsError)));
@@ -88,6 +97,6 @@
       double[] coefficients = new double[nFeatures + 1]; // last coefficient is for the constant
       alglib.lrunpack(lm, out coefficients, out nFeatures);
-      
-      int nFactorCoeff = factorVariables.Sum(kvp=>kvp.Value.Count());
+
+      int nFactorCoeff = factorVariables.Sum(kvp => kvp.Value.Count());
       int nVarCoeff = doubleVariables.Count();
       var tree = LinearModelToTreeConverter.CreateTree(factorVariables, coefficients.Take(nFactorCoeff).ToArray(),
@@ -132,7 +141,7 @@
     }
 
-    private static void PrepareData(IRegressionProblemData problemData, 
-      out double[,] inputMatrix, 
-      out IEnumerable<string> doubleVariables, 
+    private static void PrepareData(IRegressionProblemData problemData,
+      out double[,] inputMatrix,
+      out IEnumerable<string> doubleVariables,
       out IEnumerable<KeyValuePair<string, IEnumerable<string>>> factorVariables) {
       var dataset = problemData.Dataset;
Index: trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegressionModel.cs
===================================================================
--- trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegressionModel.cs	(revision 16446)
+++ trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegressionModel.cs	(revision 16448)
@@ -49,5 +49,5 @@
       get; private set;
     }
-    
+
     public override IEnumerable<string> VariablesUsedForPrediction {
       get { return allowedInputVariables.Union(factorVariables.Select(f => f.Key)); }
@@ -78,5 +78,5 @@
       this.W = new double[w.Length];
       Array.Copy(w, W, w.Length);
-      this.C = new double[covariance.GetLength(0),covariance.GetLength(1)];
+      this.C = new double[covariance.GetLength(0), covariance.GetLength(1)];
       Array.Copy(covariance, C, covariance.Length);
       this.NoiseSigma = noiseSigma;
@@ -123,21 +123,20 @@
 
       double[] d = new double[C.GetLength(0)];
-      
+
       for (int row = 0; row < n; row++) {
         for (int column = 0; column < columns; column++) {
-          d[column] = inputData[row,column];
+          d[column] = inputData[row, column];
         }
         d[columns] = 1;
 
         double var = 0.0;
-        for(int i=0;i<d.Length;i++) {
-          for(int j = 0;j<d.Length;j++) {
+        for (int i = 0; i < d.Length; i++) {
+          for (int j = 0; j < d.Length; j++) {
             var += d[i] * C[i, j] * d[j];
           }
         }
-        yield return var + NoiseSigma*NoiseSigma;
+        yield return var + NoiseSigma * NoiseSigma;
       }
     }
-
 
     public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
