Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs	(revision 10852)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs	(revision 10853)
@@ -40,11 +40,11 @@
         return GenerateModelForExponentialTransformation();
       } else if (transformation is LogarithmicTransformation) {
-
+        return GenerateModelForLogarithmicTransformation();
       } else if (transformation is PowerTransformation) {
-
+        return GenerateModelForPowerTransformation();
       } else if (transformation is ReciprocalTransformation) {
-
+        return GenerateModelForReciprocalTransformation();
       } else if (transformation is ShiftStandardDistributionTransformation) {
-
+        return GenerateModelForShiftStandardDistributionTransformation();
       }
       throw new NotImplementedException();
@@ -59,9 +59,9 @@
         return GenerateInverseModelForExponentialTransformation();
       } else if (transformation is LogarithmicTransformation) {
-
+        return GenerateInverseModelForLogarithmicTransformation();
       } else if (transformation is PowerTransformation) {
-
+        return GenerateInverseModelForPowerTransformation();
       } else if (transformation is ReciprocalTransformation) {
-
+        return GenerateInverseModelForReciprocalTransformation();
       } else if (transformation is ShiftStandardDistributionTransformation) {
 
@@ -72,4 +72,6 @@
 
     #endregion
+
+    // helper
 
     private ISymbolicExpressionTree GenerateModelForLinearTransformation() {
@@ -80,5 +82,5 @@
       // k * x
       var multiplicationNode = new Multiplication().CreateTreeNode();
-      var kNode = new ConstantTreeNode(new Constant() { Name = "K" }) { Value = kValue };
+      var kNode = new ConstantTreeNode(new Constant() { Description = "K" }) { Value = kValue };
       var xNode = new Variable(column, "x").CreateTreeNode();
       multiplicationNode.AddSubtree(kNode);
@@ -87,5 +89,5 @@
       // ( k * x ) + d
       var additionNode = new Addition().CreateTreeNode();
-      var dNode = new ConstantTreeNode(new Constant() { Name = "d" }) { Value = dValue };
+      var dNode = new ConstantTreeNode(new Constant() { Description = "d" }) { Value = dValue };
       additionNode.AddSubtree(multiplicationNode);
       additionNode.AddSubtree(dNode);
@@ -102,5 +104,5 @@
       // x - d
       var substractionNode = new Subtraction().CreateTreeNode();
-      var dNode = new ConstantTreeNode(new Constant() { Name = "d" }) { Value = dValue };
+      var dNode = new ConstantTreeNode(new Constant() { Description = "d" }) { Value = dValue };
       var xNode = new Variable(column, "x").CreateTreeNode();
       substractionNode.AddSubtree(xNode);
@@ -109,5 +111,5 @@
       // ( x - d ) / k
       var divisionNode = new Division().CreateTreeNode();
-      var kNode = new ConstantTreeNode(new Constant() { Name = "K" }) { Value = kValue };
+      var kNode = new ConstantTreeNode(new Constant() { Description = "K" }) { Value = kValue };
       divisionNode.AddSubtree(substractionNode);
       divisionNode.AddSubtree(kNode);
@@ -122,13 +124,5 @@
       var bValue = exponentialTransformation.Base;
 
-      // b ^ x
-      var powerNode = new Power().CreateTreeNode();
-      var bNode = new ConstantTreeNode(new Constant() { Name = "b" }) { Value = bValue };
-      var xNode = new Variable(column, "x").CreateTreeNode();
-      powerNode.AddSubtree(bNode);
-      powerNode.AddSubtree(xNode);
-
-      tree.Root.AddSubtree(powerNode);
-      return tree;
+      return GenTreePow_b_x(bValue);
     }
 
@@ -137,7 +131,106 @@
       var bValue = exponentialTransformation.Base;
 
+      return GenTreeLog_x_b(bValue);
+    }
+
+
+    private ISymbolicExpressionTree GenerateModelForLogarithmicTransformation() {
+      var logarithmicTransformation = (LogarithmicTransformation)transformation;
+      var bValue = logarithmicTransformation.Base;
+
+      return GenTreeLog_x_b(bValue);
+    }
+
+    private ISymbolicExpressionTree GenerateInverseModelForLogarithmicTransformation() {
+      var logarithmicTransformation = (LogarithmicTransformation)transformation;
+      var bValue = logarithmicTransformation.Base;
+
+      return GenTreePow_b_x(bValue);
+    }
+
+
+    private ISymbolicExpressionTree GenerateModelForPowerTransformation() {
+      var powerTransformation = (PowerTransformation)transformation;
+      var expValue = powerTransformation.Exponent;
+
+      // x ^ exp
+      var powerNode = new Power().CreateTreeNode();
+      var xNode = new Variable(column, "x").CreateTreeNode();
+      var expNode = new ConstantTreeNode(new Constant() { Description = "exp" }) { Value = expValue };
+      powerNode.AddSubtree(xNode);
+      powerNode.AddSubtree(expNode);
+
+      tree.Root.AddSubtree(powerNode);
+      return tree;
+    }
+
+    private ISymbolicExpressionTree GenerateInverseModelForPowerTransformation() {
+      var powerTransformation = (PowerTransformation)transformation;
+      var expValue = powerTransformation.Exponent;
+
+      // 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 };
+      rootNode.AddSubtree(xNode);
+      rootNode.AddSubtree(bNode);
+
+      tree.Root.AddSubtree(rootNode);
+      return tree;
+    }
+
+
+    private ISymbolicExpressionTree GenerateModelForReciprocalTransformation() {
+      return GenTreeDiv_1_x();
+    }
+
+    private ISymbolicExpressionTree GenerateInverseModelForReciprocalTransformation() {
+      return GenTreeDiv_1_x();
+    }
+
+    private ISymbolicExpressionTree GenerateModelForShiftStandardDistributionTransformation() {
+      var shiftStandardDistributionTransformation = (ShiftStandardDistributionTransformation)transformation;
+      var m_orgValue = shiftStandardDistributionTransformation.OriginalMean;
+      var s_orgValue = shiftStandardDistributionTransformation.OriginalStandardDeviation;
+      var m_tarValue = shiftStandardDistributionTransformation.Mean;
+      var s_tarValue = shiftStandardDistributionTransformation.StandardDeviation;
+
+      // 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 };
+      substractionNode.AddSubtree(xNode);
+      substractionNode.AddSubtree(m_orgNode);
+
+      // (x - m_org) / s_org
+      var divisionNode = new Division().CreateTreeNode();
+      var s_orgNode = new ConstantTreeNode(new Constant() { Description = "s_org" }) { Value = s_orgValue };
+      divisionNode.AddSubtree(substractionNode);
+      divisionNode.AddSubtree(s_orgNode);
+
+      // ((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 };
+      multiplicationNode.AddSubtree(divisionNode);
+      multiplicationNode.AddSubtree(s_tarNode);
+
+      // ((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 };
+      additionNode.AddSubtree(multiplicationNode);
+      additionNode.AddSubtree(m_tarNode);
+
+      tree.Root.AddSubtree(additionNode);
+      return tree;
+    }
+
+    // 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() { Name = "b" }) { Value = bValue };
+      var bNode = new ConstantTreeNode(new Constant() { Description = "b" }) { Value = b };
       var xNode = new Variable(column, "x").CreateTreeNode();
       logNode.AddSubtree(xNode);
@@ -145,4 +238,32 @@
 
       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;
     }
