Changeset 10880


Ignore:
Timestamp:
05/21/14 15:13:44 (5 years ago)
Author:
tsteinre
Message:
  • refined IModelBacktransformator
Location:
branches/DataPreprocessing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs

    r10879 r10880  
    5656      var mapper = new TransformationToSymbolicTreeMapper();
    5757      var transformator = new SymbolicExpressionTreeBacktransformator(mapper);
    58       transformator.Backtransform(Content.Model, Content.ProblemData.Transformations);
     58      var transformations = Content.ProblemData.Transformations;
     59      var targetVar = Content.ProblemData.TargetVariable;
     60
     61      transformator.Backtransform(Content.Model, transformations, targetVar);
    5962      // TODO: cloning is needed for refreshing the view, find a better approach for this.
    6063      Content = (SymbolicRegressionSolution)Content.Clone();
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicExpressionTreeBacktransformator.cs

    r10878 r10880  
    3434    }
    3535
    36     public void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations) {
     36    public void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations, string targetVariable) {
    3737      var symbolicModel = (ISymbolicDataAnalysisModel)model;
    3838
    3939      foreach (var transformation in transformations) {
    40         ApplyBacktransformation(transformation, symbolicModel.SymbolicExpressionTree);
     40        ApplyBacktransformation(transformation, symbolicModel.SymbolicExpressionTree, targetVariable);
    4141      }
    4242    }
    4343
    44     private void ApplyBacktransformation(ITransformation transformation, ISymbolicExpressionTree symbolicExpressionTree) {
     44    private void ApplyBacktransformation(ITransformation transformation, ISymbolicExpressionTree symbolicExpressionTree, string targetVariable) {
    4545      var variableNodes = symbolicExpressionTree.IterateNodesBreadth()
    4646        .OfType<VariableTreeNode>()
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IModelBacktransformator.cs

    r10869 r10880  
    2525namespace HeuristicLab.Problems.DataAnalysis {
    2626  public interface IModelBacktransformator {
    27     void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations);
     27    void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations, string targetVariable);
    2828  }
    2929}
Note: See TracChangeset for help on using the changeset viewer.