Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj	(revision 14240)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj	(revision 14241)
@@ -119,4 +119,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="SolutionComparisonView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SolutionComparisonView.Designer.cs">
+      <DependentUpon>SolutionComparisonView.cs</DependentUpon>
+    </Compile>
     <Compile Include="InteractiveSymbolicClassificationSolutionSimplifierView.cs">
       <SubType>UserControl</SubType>
@@ -157,4 +163,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Algorithms.DataAnalysis\3.4\HeuristicLab.Algorithms.DataAnalysis-3.4.csproj">
+      <Project>{2E782078-FA81-4B70-B56F-74CE38DAC6C8}</Project>
+      <Name>HeuristicLab.Algorithms.DataAnalysis-3.4</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.Designer.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.Designer.cs	(revision 14241)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.Designer.cs	(revision 14241)
@@ -0,0 +1,60 @@
+﻿#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
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
+  partial class SolutionComparisonView {
+    /// <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.SuspendLayout();
+      // 
+      // ClassificationSolutionComparisonView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "SymbolicClassificationSolutionComparisonView";
+      this.Size = new System.Drawing.Size(418, 257);
+      this.ResumeLayout(false);
+    }
+
+    #endregion
+  }
+}
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.cs	(revision 14241)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SolutionComparisonView.cs	(revision 14241)
@@ -0,0 +1,107 @@
+﻿#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;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Views.Classification;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
+  [View("Solution Comparison")]
+  [Content(typeof(ISymbolicClassificationSolution))]
+  public partial class SolutionComparisonView : ClassificationSolutionComparisonView {
+
+    public SolutionComparisonView() {
+      InitializeComponent();
+    }
+
+    public new ISymbolicClassificationSolution Content {
+      get { return (ISymbolicClassificationSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override IEnumerable<IClassificationSolution> GenerateClassificationSolutions() {
+      var solutionsBase = base.GenerateClassificationSolutions();
+      var solutions = new List<IClassificationSolution>();
+
+      var symbolicSolution = Content;
+
+      // does not support lagged variables
+      if (symbolicSolution.Model.SymbolicExpressionTree.IterateNodesPrefix().OfType<LaggedVariableTreeNode>().Any()) return solutionsBase;
+
+      var problemData = (IClassificationProblemData)symbolicSolution.ProblemData.Clone();
+      if (!problemData.TrainingIndices.Any()) return null; // don't create an comparison models if the problem does not have a training set (e.g. loaded into an existing model)
+
+      var usedDoubleVariables =
+        symbolicSolution.Model.SymbolicExpressionTree.IterateNodesPostfix()
+        .OfType<VariableTreeNode>()
+        .Select(node => node.VariableName)
+      .Concat(
+        symbolicSolution.Model.SymbolicExpressionTree.IterateNodesPostfix()
+        .OfType<VariableConditionTreeNode>()
+        .Select(node => node.VariableName)
+        )
+      .Distinct();
+
+      var usedFactorVariables =
+        symbolicSolution.Model.SymbolicExpressionTree.IterateNodesPostfix()
+        .OfType<FactorVariableTreeNode>()
+        .Select(node => Tuple.Create(node.VariableName, node.VariableValue))
+        .Distinct();
+
+      // create a new problem and dataset
+      var variableNames =
+        usedDoubleVariables
+        .Concat(usedFactorVariables.Select(t => t.Item1 + "=" + t.Item2))
+        .Concat(new string[] { problemData.TargetVariable })
+        .ToArray();
+      var variableValues =
+        usedDoubleVariables.Select(name => problemData.Dataset.GetDoubleValues(name).ToList())
+        .Concat(
+        // create binary variable
+          usedFactorVariables.Select(t => problemData.Dataset.GetReadOnlyStringValues(t.Item1).Select(val => val == t.Item2 ? 1.0 : 0.0).ToList())
+        )
+        .Concat(new[] { problemData.Dataset.GetDoubleValues(problemData.TargetVariable).ToList() });
+
+      var newDs = new Dataset(variableNames, variableValues);
+      var newProblemData = new ClassificationProblemData(newDs, variableNames.Take(variableNames.Length - 1), variableNames.Last());
+      newProblemData.TrainingPartition.Start = problemData.TrainingPartition.Start;
+      newProblemData.TrainingPartition.End = problemData.TrainingPartition.End;
+      newProblemData.TestPartition.Start = problemData.TestPartition.Start;
+      newProblemData.TestPartition.End = problemData.TestPartition.End;
+
+      try {
+        var oneR = OneR.CreateOneRSolution(newProblemData);
+        oneR.Name = "OneR Classification Solution (subset)";
+        solutions.Add(oneR);
+      } catch (NotSupportedException) { } catch (ArgumentException) { }
+      try {
+        var lda = LinearDiscriminantAnalysis.CreateLinearDiscriminantAnalysisSolution(newProblemData);
+        lda.Name = "Linear Discriminant Analysis Solution (subset)";
+        solutions.Add(lda);
+      } catch (NotSupportedException) { } catch (ArgumentException) { }
+
+      return solutionsBase.Concat(solutions);
+    }
+  }
+}
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionComparisonView.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionComparisonView.cs	(revision 14240)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionComparisonView.cs	(revision 14241)
@@ -80,7 +80,6 @@
 
           IClassificationProblemData problemData = Content.ProblemData;
-          var dataset = problemData.Dataset;
           solutions = new List<IClassificationSolution>() { Content };
-          solutions.AddRange(GenerateClassificationSolutions(problemData));
+          solutions.AddRange(GenerateClassificationSolutions().OrderBy(s=>s.Name));
 
           dataGridView.ColumnCount = 4;
@@ -105,9 +104,9 @@
             var trainingIndizes = problemData.TrainingIndices;
             var originalTrainingValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, trainingIndizes);
-            var estimatedTrainingValues = solution.Model.GetEstimatedClassValues(dataset, trainingIndizes);
+            var estimatedTrainingValues = solution.EstimatedTrainingClassValues;
 
             var testIndices = problemData.TestIndices;
             var originalTestValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, testIndices);
-            var estimatedTestValues = solution.Model.GetEstimatedClassValues(dataset, testIndices);
+            var estimatedTestValues = solution.EstimatedTestClassValues;
 
             OnlineCalculatorError errorState;
@@ -126,5 +125,6 @@
     }
 
-    private IEnumerable<IClassificationSolution> GenerateClassificationSolutions(IClassificationProblemData problemData) {
+    protected virtual IEnumerable<IClassificationSolution> GenerateClassificationSolutions() {
+      var problemData = Content.ProblemData;
       var newSolutions = new List<IClassificationSolution>();
       var zeroR = ZeroR.CreateZeroRSolution(problemData);
@@ -133,10 +133,10 @@
       try {
         var oneR = OneR.CreateOneRSolution(problemData);
-        oneR.Name = "OneR Classification Solution";
+        oneR.Name = "OneR Classification Solution (all variables)";
         newSolutions.Add(oneR);
       } catch (NotSupportedException) { } catch (ArgumentException) { }
       try {
         var lda = LinearDiscriminantAnalysis.CreateLinearDiscriminantAnalysisSolution(problemData);
-        lda.Name = "Linear Discriminant Analysis Solution";
+        lda.Name = "Linear Discriminant Analysis Solution (all variables)";
         newSolutions.Add(lda);
       } catch (NotSupportedException) { } catch (ArgumentException) { }
