Index: /branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs	(revision 14243)
@@ -103,6 +103,6 @@
         var varName = kvp.Key;
         foreach (var cat in kvp.Value) {
-          FactorVariableTreeNode vNode =
-            (FactorVariableTreeNode)new HeuristicLab.Problems.DataAnalysis.Symbolic.FactorVariable().CreateTreeNode();
+          BinaryFactorVariableTreeNode vNode =
+            (BinaryFactorVariableTreeNode)new HeuristicLab.Problems.DataAnalysis.Symbolic.BinaryFactorVariable().CreateTreeNode();
           vNode.VariableName = varName;
           vNode.VariableValue = cat;
Index: /branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 14243)
@@ -107,6 +107,6 @@
         var varName = kvp.Key;
         foreach (var cat in kvp.Value) {
-          FactorVariableTreeNode vNode =
-            (FactorVariableTreeNode)new HeuristicLab.Problems.DataAnalysis.Symbolic.FactorVariable().CreateTreeNode();
+          BinaryFactorVariableTreeNode vNode =
+            (BinaryFactorVariableTreeNode)new HeuristicLab.Problems.DataAnalysis.Symbolic.BinaryFactorVariable().CreateTreeNode();
           vNode.VariableName = varName;
           vNode.VariableValue = cat;
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs	(revision 14243)
@@ -205,5 +205,5 @@
           ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
           VariableTreeNode variableTreeNode = node as VariableTreeNode;
-          FactorVariableTreeNode factorVariableTreeNode = node as FactorVariableTreeNode;
+          BinaryFactorVariableTreeNode factorVariableTreeNode = node as BinaryFactorVariableTreeNode;
           if (constantTreeNode != null)
             c[i++] = constantTreeNode.Value;
@@ -273,5 +273,5 @@
         ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
         VariableTreeNode variableTreeNode = node as VariableTreeNode;
-        FactorVariableTreeNode factorVarTreeNode = node as FactorVariableTreeNode;
+        BinaryFactorVariableTreeNode factorVarTreeNode = node as BinaryFactorVariableTreeNode;
         if (constantTreeNode != null)
           constantTreeNode.Value = constants[i++];
@@ -305,7 +305,7 @@
         return true;
       }
-      if (node.Symbol is Variable || node.Symbol is FactorVariable) {
+      if (node.Symbol is Variable || node.Symbol is BinaryFactorVariable) {
         var varNode = node as VariableTreeNodeBase;
-        var factorVarNode = node as FactorVariableTreeNode;
+        var factorVarNode = node as BinaryFactorVariableTreeNode;
         // factor variable values are only 0 or 1 and set in x accordingly
         var par = new AutoDiff.Variable();
@@ -493,5 +493,5 @@
         where
          !(n.Symbol is Variable) &&
-         !(n.Symbol is FactorVariable) &&
+         !(n.Symbol is BinaryFactorVariable) &&
          !(n.Symbol is Constant) &&
          !(n.Symbol is Addition) &&
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs	(revision 14243)
@@ -35,5 +35,5 @@
   [View("Variable View")]
   [Content(typeof(Variable), true)]
-  [Content(typeof(FactorVariable), true)]
+  [Content(typeof(BinaryFactorVariable), true)]
   public partial class VariableView : SymbolView {
     private CheckedItemCollectionView<StringValue> variableNamesView;
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 14243)
@@ -168,5 +168,5 @@
         tree.Root.ForEachNodePrefix(node => {
           if (node is IVariableTreeNode) {
-            var factorNode = node as FactorVariableTreeNode;
+            var factorNode = node as BinaryFactorVariableTreeNode;
             if (factorNode != null && !aggregateFactorVariables) {
               IncReferenceCount(references, factorNode.VariableName + "=" + factorNode.VariableValue);
@@ -186,5 +186,5 @@
       if (node is IVariableTreeNode) {
         var laggedVarTreeNode = node as LaggedVariableTreeNode;
-        var factorVarTreeNode = node as FactorVariableTreeNode;
+        var factorVarTreeNode = node as BinaryFactorVariableTreeNode;
         var varConditionTreeNode = node as VariableConditionTreeNode;
         if (laggedVarTreeNode != null) {
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs	(revision 14243)
@@ -53,5 +53,5 @@
       constant.MaxValue = 20;
       var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
-      var factorVariableSymbol = new FactorVariable();
+      var factorVariableSymbol = new BinaryFactorVariable();
 
       var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol, factorVariableSymbol };
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 14243)
@@ -115,5 +115,5 @@
       constant.MaxValue = 20;
       var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
-      var factorVariable = new FactorVariable();
+      var factorVariable = new BinaryFactorVariable();
       var laggedVariable = new LaggedVariable();
       laggedVariable.InitialFrequency = 0.0;
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 14243)
@@ -104,5 +104,5 @@
       constant.MaxValue = 20;
       var variableSymbol = new Variable();
-      var factorVariable = new FactorVariable();
+      var factorVariable = new BinaryFactorVariable();
       var laggedVariable = new LaggedVariable();
       var autoregressiveVariable = new AutoregressiveTargetVariable();
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 14243)
@@ -132,5 +132,5 @@
       { typeof(Erf), OpCodes.Erf},
       { typeof(Bessel), OpCodes.Bessel},
-      { typeof(FactorVariable), OpCodes.FactorVariable }
+      { typeof(BinaryFactorVariable), OpCodes.FactorVariable }
     };
 
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 14243)
@@ -629,5 +629,5 @@
           }
         case OpCodes.FactorVariable: {
-            FactorVariableTreeNode varNode = currentInstr.dynamicNode as FactorVariableTreeNode;
+            BinaryFactorVariableTreeNode varNode = currentInstr.dynamicNode as BinaryFactorVariableTreeNode;
             il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
             il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.data);
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 14243)
@@ -145,5 +145,5 @@
           instr.data = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
         } else if (instr.opCode == OpCodes.FactorVariable) {
-          var factorTreeNode = instr.dynamicNode as FactorVariableTreeNode;
+          var factorTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
           instr.data = dataset.GetReadOnlyStringValues(factorTreeNode.VariableName); 
         } else if (instr.opCode == OpCodes.LagVariable) {
@@ -461,5 +461,5 @@
         case OpCodes.FactorVariable: {
             if (row < 0 || row >= dataset.Rows) return double.NaN;
-            var factorVarTreeNode = currentInstr.dynamicNode as FactorVariableTreeNode;
+            var factorVarTreeNode = currentInstr.dynamicNode as BinaryFactorVariableTreeNode;
             return ((IList<string>)currentInstr.data)[row] == factorVarTreeNode.VariableValue ? factorVarTreeNode.Weight : 0;
           }
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 14243)
@@ -151,5 +151,5 @@
           if (row < 0 || row >= dataset.Rows) instr.value = double.NaN;
           else {
-            var factorTreeNode = instr.dynamicNode as FactorVariableTreeNode;
+            var factorTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
             instr.value = ((IList<string>)instr.data)[row] == factorTreeNode.VariableValue ? factorTreeNode.Weight : 0;
           }
@@ -399,5 +399,5 @@
             break;
           case OpCodes.FactorVariable: {
-              var factorVariableTreeNode = instr.dynamicNode as FactorVariableTreeNode;
+              var factorVariableTreeNode = instr.dynamicNode as BinaryFactorVariableTreeNode;
               instr.data = dataset.GetReadOnlyStringValues(factorVariableTreeNode.VariableName);
             }
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs	(revision 14243)
@@ -837,5 +837,5 @@
       var groupedVarNodes = from node in subtrees.OfType<VariableTreeNodeBase>()
                             let lag = (node is LaggedVariableTreeNode) ? ((LaggedVariableTreeNode)node).Lag : 0
-                            let cat = (node is FactorVariableTreeNode) ? ((FactorVariableTreeNode)node).VariableValue : string.Empty
+                            let cat = (node is BinaryFactorVariableTreeNode) ? ((BinaryFactorVariableTreeNode)node).VariableValue : string.Empty
                             group node by node.VariableName + cat + lag into g
                             select g;
@@ -947,6 +947,6 @@
         return aVar.VariableName == bVar.VariableName;
       }
-      var aFactor = a as FactorVariableTreeNode;
-      var bFactor = b as FactorVariableTreeNode;
+      var aFactor = a as BinaryFactorVariableTreeNode;
+      var bFactor = b as BinaryFactorVariableTreeNode;
       if (aFactor != null && bFactor != null) {
         return aFactor.VariableName == bFactor.VariableName &&
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs	(revision 14243)
@@ -219,5 +219,5 @@
         }
       }
-      foreach (var factorSymbol in grammar.Symbols.OfType<FactorVariable>()) {
+      foreach (var factorSymbol in grammar.Symbols.OfType<BinaryFactorVariable>()) {
         if (!factorSymbol.Fixed) {
           factorSymbol.AllVariableNames = problemData.InputVariables.Select(x => x.Value).Where(x => ds.VariableHasType<string>(x));
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 14242)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 14243)
@@ -43,5 +43,5 @@
       //optimization: constant nodes return always the same value
       ConstantTreeNode constantNode = node as ConstantTreeNode;
-      FactorVariableTreeNode factorNode = node as FactorVariableTreeNode;
+      BinaryFactorVariableTreeNode factorNode = node as BinaryFactorVariableTreeNode;
       if (constantNode != null) {
         yield return constantNode.Value;
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariable.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariable.cs	(revision 14243)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariable.cs	(revision 14243)
@@ -0,0 +1,76 @@
+#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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("BinaryFactorVariable", "Represents a categorical variable (comparable to factors as in R) and it's value.")]
+  public class BinaryFactorVariable : VariableBase {
+
+    private Dictionary<string, List<string>> variableValues;
+
+    [Storable]
+    public IEnumerable<KeyValuePair<string, List<string>>> VariableValues {
+      get { return variableValues; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        variableValues.Clear();
+        foreach (var kvp in value) {
+          variableValues.Add(kvp.Key, new List<string>(kvp.Value));
+        }
+      }
+    }
+
+    [StorableConstructor]
+    protected BinaryFactorVariable(bool deserializing)
+      : base(deserializing) {
+      variableValues = new Dictionary<string, List<string>>();
+    }
+    protected BinaryFactorVariable(BinaryFactorVariable original, Cloner cloner)
+      : base(original, cloner) {
+      variableValues =
+        original.variableValues.ToDictionary(kvp => kvp.Key, kvp => new List<string>(kvp.Value));
+    }
+    public BinaryFactorVariable() : this("BinaryFactorVariable", "Represents a categorical variable (comparable to factors as in R) and it's value.") { }
+    public BinaryFactorVariable(string name, string description)
+      : base(name, description) {
+      variableValues = new Dictionary<string, List<string>>();
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new FactorVariableTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BinaryFactorVariable(this, cloner);
+    }
+
+    public IEnumerable<string> GetVariableValues(string variableName) {
+      return variableValues[variableName];
+    }
+  }
+}
Index: /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs	(revision 14243)
+++ /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs	(revision 14243)
@@ -0,0 +1,81 @@
+#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  public class BinaryFactorVariableTreeNode : VariableTreeNodeBase {
+    public new BinaryFactorVariable Symbol {
+      get { return (BinaryFactorVariable)base.Symbol; }
+    }
+
+    [Storable]
+    private string variableValue;
+    public string VariableValue {
+      get { return variableValue; }
+      set { variableValue = value; }
+    }
+
+    [StorableConstructor]
+    protected BinaryFactorVariableTreeNode(bool deserializing) : base(deserializing) { }
+    protected BinaryFactorVariableTreeNode(BinaryFactorVariableTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      variableValue = original.variableValue;
+    }
+    protected BinaryFactorVariableTreeNode() { }
+    public BinaryFactorVariableTreeNode(BinaryFactorVariable variableSymbol) : base(variableSymbol) { }
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      variableValue = Symbol.GetVariableValues(VariableName).SampleRandom(random);
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      // 50% additive & 50% multiplicative
+      if (random.NextDouble() < 0.5) {
+        double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
+        Weight = Weight + x * shakingFactor;
+      } else {
+        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeWeightManipulatorSigma);
+        Weight = Weight * x;
+      }
+      if (random.NextDouble() < 0.2) {
+        VariableName = Symbol.VariableNames.SampleRandom(random);
+      }
+      variableValue = Symbol.GetVariableValues(VariableName).SampleRandom(random);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BinaryFactorVariableTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return base.ToString() + " = " + variableValue;
+    }
+  }
+}
Index: anches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariable.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariable.cs	(revision 14242)
+++ 	(revision )
@@ -1,76 +1,0 @@
-#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.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [StorableClass]
-  [Item("FactorVariable", "Represents a categorical variable (comparable to factors as in R).")]
-  public class FactorVariable : VariableBase {
-
-    private Dictionary<string, List<string>> variableValues;
-
-    [Storable]
-    public IEnumerable<KeyValuePair<string, List<string>>> VariableValues {
-      get { return variableValues; }
-      set {
-        if (value == null) throw new ArgumentNullException();
-        variableValues.Clear();
-        foreach (var kvp in value) {
-          variableValues.Add(kvp.Key, new List<string>(kvp.Value));
-        }
-      }
-    }
-
-    [StorableConstructor]
-    protected FactorVariable(bool deserializing)
-      : base(deserializing) {
-      variableValues = new Dictionary<string, List<string>>();
-    }
-    protected FactorVariable(FactorVariable original, Cloner cloner)
-      : base(original, cloner) {
-      variableValues =
-        original.variableValues.ToDictionary(kvp => kvp.Key, kvp => new List<string>(kvp.Value));
-    }
-    public FactorVariable() : this("FactorVariable", "Represents a categorical variable (comparable to factors as in R).") { }
-    public FactorVariable(string name, string description)
-      : base(name, description) {
-      variableValues = new Dictionary<string, List<string>>();
-    }
-
-    public override ISymbolicExpressionTreeNode CreateTreeNode() {
-      return new FactorVariableTreeNode(this);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new FactorVariable(this, cloner);
-    }
-
-    public IEnumerable<string> GetVariableValues(string variableName) {
-      return variableValues[variableName];
-    }
-  }
-}
Index: anches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariableTreeNode.cs
===================================================================
--- /branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariableTreeNode.cs	(revision 14242)
+++ 	(revision )
@@ -1,82 +1,0 @@
-#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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Random;
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [StorableClass]
-  public class FactorVariableTreeNode : VariableTreeNodeBase {
-    public new FactorVariable Symbol {
-      get { return (FactorVariable)base.Symbol; }
-    }
-
-    [Storable]
-    private string variableValue;
-    public string VariableValue {
-      get { return variableValue; }
-      set { variableValue = value; }
-    }
-
-    [StorableConstructor]
-    protected FactorVariableTreeNode(bool deserializing) : base(deserializing) { }
-    protected FactorVariableTreeNode(FactorVariableTreeNode original, Cloner cloner)
-      : base(original, cloner) {
-      variableValue = original.variableValue;
-    }
-    protected FactorVariableTreeNode() { }
-    public FactorVariableTreeNode(FactorVariable variableSymbol) : base(variableSymbol) { }
-
-    public override bool HasLocalParameters {
-      get { return true; }
-    }
-
-    public override void ResetLocalParameters(IRandom random) {
-      base.ResetLocalParameters(random);
-      variableValue = Symbol.GetVariableValues(VariableName).SampleRandom(random);
-    }
-
-    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
-      // 50% additive & 50% multiplicative
-      if (random.NextDouble() < 0.5) {
-        double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
-        Weight = Weight + x * shakingFactor;
-      } else {
-        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeWeightManipulatorSigma);
-        Weight = Weight * x;
-      }
-      if (random.NextDouble() < 0.2) {
-        VariableName = Symbol.VariableNames.SampleRandom(random);
-      }
-      variableValue = Symbol.GetVariableValues(VariableName).SampleRandom(random);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new FactorVariableTreeNode(this, cloner);
-    }
-
-    public override string ToString() {
-      return base.ToString() + " = " + variableValue;
-    }
-  }
-}
