Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs	(revision 10865)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs	(revision 10866)
@@ -65,5 +65,5 @@
         return GenerateInverseModelForReciprocalTransformation();
       } else if (transformation is ShiftStandardDistributionTransformation) {
-
+        GenerateInverseModelForShiftStandardDistributionTransformation();
       }
 
@@ -82,6 +82,6 @@
       // k * x
       var multiplicationNode = new Multiplication().CreateTreeNode();
-      var kNode = new ConstantTreeNode(new Constant() { Description = "K" }) { Value = kValue };
-      var xNode = new Variable(column, "x").CreateTreeNode();
+      var kNode = CreateConstantTreeNode("k", kValue);
+      var xNode = CreateVariableTreeNode(column, "x");
       multiplicationNode.AddSubtree(kNode);
       multiplicationNode.AddSubtree(xNode);
@@ -89,5 +89,5 @@
       // ( k * x ) + d
       var additionNode = new Addition().CreateTreeNode();
-      var dNode = new ConstantTreeNode(new Constant() { Description = "d" }) { Value = dValue };
+      var dNode = CreateConstantTreeNode("d", dValue);
       additionNode.AddSubtree(multiplicationNode);
       additionNode.AddSubtree(dNode);
@@ -104,6 +104,6 @@
       // x - d
       var substractionNode = new Subtraction().CreateTreeNode();
-      var dNode = new ConstantTreeNode(new Constant() { Description = "d" }) { Value = dValue };
-      var xNode = new Variable(column, "x").CreateTreeNode();
+      var dNode = CreateConstantTreeNode("d", dValue);
+      var xNode = CreateVariableTreeNode(column, "x");
       substractionNode.AddSubtree(xNode);
       substractionNode.AddSubtree(dNode);
@@ -111,5 +111,5 @@
       // ( x - d ) / k
       var divisionNode = new Division().CreateTreeNode();
-      var kNode = new ConstantTreeNode(new Constant() { Description = "K" }) { Value = kValue };
+      var kNode = CreateConstantTreeNode("k", kValue);
       divisionNode.AddSubtree(substractionNode);
       divisionNode.AddSubtree(kNode);
@@ -156,6 +156,6 @@
       // x ^ exp
       var powerNode = new Power().CreateTreeNode();
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      var expNode = new ConstantTreeNode(new Constant() { Description = "exp" }) { Value = expValue };
+      var xNode = CreateVariableTreeNode(column, "x");
+      var expNode = CreateConstantTreeNode("exp", expValue);
       powerNode.AddSubtree(xNode);
       powerNode.AddSubtree(expNode);
@@ -171,6 +171,6 @@
       // rt(x, b)
       var rootNode = new Root().CreateTreeNode();
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      var bNode = new ConstantTreeNode(new Constant() { Description = "b" }) { Value = expValue };
+      var xNode = CreateVariableTreeNode(column, "x");
+      var bNode = CreateConstantTreeNode("b", expValue);
       rootNode.AddSubtree(xNode);
       rootNode.AddSubtree(bNode);
@@ -196,8 +196,66 @@
       var s_tarValue = shiftStandardDistributionTransformation.StandardDeviation;
 
+      return GenTreeShiftStdDist(column, m_orgValue, s_orgValue, m_tarValue, s_tarValue);
+    }
+
+    private ISymbolicExpressionTree GenerateInverseModelForShiftStandardDistributionTransformation() {
+      var shiftStandardDistributionTransformation = (ShiftStandardDistributionTransformation)transformation;
+      var m_orgValue = shiftStandardDistributionTransformation.OriginalMean;
+      var s_orgValue = shiftStandardDistributionTransformation.OriginalStandardDeviation;
+      var m_tarValue = shiftStandardDistributionTransformation.Mean;
+      var s_tarValue = shiftStandardDistributionTransformation.StandardDeviation;
+
+      return GenTreeShiftStdDist(column, m_tarValue, s_tarValue, m_orgValue, s_orgValue);
+    }
+
+    // helper's helper:
+
+    private ISymbolicExpressionTree GenTreeLog_x_b(double b) {
+      var tree = CreateNewTree();
+
+      // log(x, b)
+      var logNode = new Logarithm().CreateTreeNode();
+      var bNode = CreateConstantTreeNode("b", b);
+      var xNode = CreateVariableTreeNode(column, "x");
+      logNode.AddSubtree(xNode);
+      logNode.AddSubtree(bNode);
+
+      tree.Root.AddSubtree(logNode);
+      return tree;
+    }
+
+    private ISymbolicExpressionTree GenTreePow_b_x(double b) {
+      var tree = CreateNewTree();
+
+      // b ^ x
+      var powerNode = new Power().CreateTreeNode();
+      var bNode = CreateConstantTreeNode("b", b);
+      var xNode = CreateVariableTreeNode(column, "x");
+      powerNode.AddSubtree(bNode);
+      powerNode.AddSubtree(xNode);
+
+      tree.Root.AddSubtree(powerNode);
+      return tree;
+    }
+
+    private ISymbolicExpressionTree GenTreeDiv_1_x() {
+      var tree = CreateNewTree();
+
+      // 1 / x
+      var divNode = new Division().CreateTreeNode();
+      var oneNode = CreateConstantTreeNode("1", 1.0);
+      var xNode = CreateVariableTreeNode(column, "x");
+      divNode.AddSubtree(oneNode);
+      divNode.AddSubtree(xNode);
+
+      tree.Root.AddSubtree(divNode);
+      return tree;
+    }
+    private ISymbolicExpressionTree GenTreeShiftStdDist(string variable, double m_org, double s_org, double m_tar, double s_tar) {
+      var tree = CreateNewTree();
       // x - m_org
       var substractionNode = new Subtraction().CreateTreeNode();
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      var m_orgNode = new ConstantTreeNode(new Constant() { Description = "m_org" }) { Value = m_orgValue };
+      var xNode = CreateVariableTreeNode(variable, "x");
+      var m_orgNode = CreateConstantTreeNode("m_org", m_org);
       substractionNode.AddSubtree(xNode);
       substractionNode.AddSubtree(m_orgNode);
@@ -205,5 +263,5 @@
       // (x - m_org) / s_org
       var divisionNode = new Division().CreateTreeNode();
-      var s_orgNode = new ConstantTreeNode(new Constant() { Description = "s_org" }) { Value = s_orgValue };
+      var s_orgNode = CreateConstantTreeNode("s_org", s_org);
       divisionNode.AddSubtree(substractionNode);
       divisionNode.AddSubtree(s_orgNode);
@@ -211,5 +269,5 @@
       // ((x - m_org) / s_org ) * s_tar
       var multiplicationNode = new Multiplication().CreateTreeNode();
-      var s_tarNode = new ConstantTreeNode(new Constant() { Description = "s_tar" }) { Value = s_tarValue };
+      var s_tarNode = CreateConstantTreeNode("s_tar", s_tar);
       multiplicationNode.AddSubtree(divisionNode);
       multiplicationNode.AddSubtree(s_tarNode);
@@ -217,5 +275,5 @@
       // ((x - m_org) / s_org ) * s_tar + m_tar
       var additionNode = new Addition().CreateTreeNode();
-      var m_tarNode = new ConstantTreeNode(new Constant() { Description = "m_tar" }) { Value = m_tarValue };
+      var m_tarNode = CreateConstantTreeNode("m_tar", m_tar);
       additionNode.AddSubtree(multiplicationNode);
       additionNode.AddSubtree(m_tarNode);
@@ -225,46 +283,9 @@
     }
 
-    // helper's helper:
-
-    private ISymbolicExpressionTree GenTreeLog_x_b(double b) {
-      var tree = CreateNewTree();
-
-      // log(x, b)
-      var logNode = new Logarithm().CreateTreeNode();
-      var bNode = new ConstantTreeNode(new Constant() { Description = "b" }) { Value = b };
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      logNode.AddSubtree(xNode);
-      logNode.AddSubtree(bNode);
-
-      tree.Root.AddSubtree(logNode);
-      return tree;
-    }
-
-    private ISymbolicExpressionTree GenTreePow_b_x(double b) {
-      var tree = CreateNewTree();
-
-      // b ^ x
-      var powerNode = new Power().CreateTreeNode();
-      var bNode = new ConstantTreeNode(new Constant() { Description = "b" }) { Value = b };
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      powerNode.AddSubtree(bNode);
-      powerNode.AddSubtree(xNode);
-
-      tree.Root.AddSubtree(powerNode);
-      return tree;
-    }
-
-    private ISymbolicExpressionTree GenTreeDiv_1_x() {
-      var tree = CreateNewTree();
-
-      // 1 / x
-      var divNode = new Division().CreateTreeNode();
-      var oneNode = new ConstantTreeNode(new Constant() { Description = "1" }) { Value = 1.0 };
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      divNode.AddSubtree(oneNode);
-      divNode.AddSubtree(xNode);
-
-      tree.Root.AddSubtree(divNode);
-      return tree;
+    private ConstantTreeNode CreateConstantTreeNode(string description, double value) {
+      return new ConstantTreeNode(new Constant() { Description = description }) { Value = value };
+    }
+    private ISymbolicExpressionTreeNode CreateVariableTreeNode(string name, string description) {
+      return new Variable(name, description).CreateTreeNode();
     }
 
