Index: branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 15848)
+++ branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 15856)
@@ -242,11 +242,31 @@
     }
 
-    public virtual IDataAnalysisProblemData InverseTransform() {
-      var newDataset = InverseTransform(Dataset, Transformations);
+    public virtual IDataAnalysisProblemData Transform() {
+      var newDataset = Transform(Dataset, Transformations);
+
+      var extendedInputs = ExtendInputVariables(AllowedInputVariables, Transformations);
+      var checkedInputs = new CheckedItemList<StringValue>(newDataset.VariableNames.Select(x => new StringValue(x)));
+      foreach (var input in checkedInputs) checkedInputs.SetItemCheckedState(input, extendedInputs.Contains(input.Value));
 
       // TODO: Cannot create concrete instance here (maybe derived Create-method?)
       var cloner = new Cloner();
       cloner.RegisterClonedObject(Dataset, newDataset);
-      cloner.RegisterClonedObject(TransformationsParameter.Value, new ItemList<IDataAnalysisTransformation>().AsReadOnly());
+      cloner.RegisterClonedObject(InputVariables, checkedInputs.AsReadOnly());
+      //cloner.RegisterClonedObject(TransformationsParameter.Value, new ItemList<IDataAnalysisTransformation>(transformations).AsReadOnly());
+
+      return cloner.Clone(this);
+    }
+
+    public virtual IDataAnalysisProblemData InverseTransform() {
+      var newDataset = InverseTransform(Dataset, Transformations);
+
+      var checkedInputs = new CheckedItemList<StringValue>(newDataset.VariableNames.Select(x => new StringValue(x)));
+      foreach (var input in checkedInputs) checkedInputs.SetItemCheckedState(input, AllowedInputVariables.Contains(input.Value));
+
+      // TODO: Cannot create concrete instance here (maybe derived Create-method?)
+      var cloner = new Cloner();
+      cloner.RegisterClonedObject(Dataset, newDataset);
+      cloner.RegisterClonedObject(InputVariables, checkedInputs.AsReadOnly());
+      //cloner.RegisterClonedObject(TransformationsParameter.Value, new ItemList<IDataAnalysisTransformation>().AsReadOnly());
 
       return cloner.Clone(this);
@@ -281,8 +301,12 @@
         var trans = (ITransformation<double>)transformation.Transformation;
 
-        var transformedData = modifiableDataset.GetDoubleValues(transformation.TransformedVariable);
-
-        var originalData = trans.InverseApply(transformedData).ToList();
-        modifiableDataset.ReplaceVariable(transformation.OriginalVariable, originalData);
+        var prevTransformations = transformations.Except(transformationsStack);
+        bool originalWasChanged = prevTransformations.Any(x => x.TransformedVariable == transformation.OriginalVariable);
+        if (originalWasChanged) {
+          var transformedData = modifiableDataset.GetDoubleValues(transformation.TransformedVariable);
+
+          var originalData = trans.InverseApply(transformedData).ToList();
+          modifiableDataset.ReplaceVariable(transformation.OriginalVariable, originalData);
+        }
 
         bool transformedVariablePending = transformationsStack.Any(x => x.OriginalVariable == transformation.TransformedVariable);
@@ -293,4 +317,32 @@
       return modifiableDataset;
     }
+
+    public static IEnumerable<string> ExtendInputVariables(IEnumerable<string> oldInputVariables, IEnumerable<IDataAnalysisTransformation> transformations) {
+      var inputs = new HashSet<string>(oldInputVariables);
+
+      foreach (var transformation in transformations) {
+        if (inputs.Contains(transformation.OriginalVariable))
+          inputs.Add(transformation.TransformedVariable);
+      }
+
+      return inputs;
+    }
+
+    public static IEnumerable<string> RemoveVirtualVariables(IEnumerable<string> variables, IEnumerable<IDataAnalysisTransformation> transformations) {
+      var remainingVariables = new HashSet<string>(variables);
+
+      var transformationsStack = new Stack<IDataAnalysisTransformation>(transformations);
+
+      while (transformationsStack.Any()) {
+        var transformation = transformationsStack.Pop();
+
+
+        bool transformedVariablePending = transformationsStack.Any(x => x.OriginalVariable == transformation.TransformedVariable);
+        if (!transformedVariablePending)
+          remainingVariables.Remove(transformation.TransformedVariable);
+      }
+
+      return remainingVariables;
+    }
   }
 }
