Changeset 10880
- Timestamp:
- 05/21/14 15:13:44 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs
r10879 r10880 56 56 var mapper = new TransformationToSymbolicTreeMapper(); 57 57 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); 59 62 // TODO: cloning is needed for refreshing the view, find a better approach for this. 60 63 Content = (SymbolicRegressionSolution)Content.Clone(); -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicExpressionTreeBacktransformator.cs
r10878 r10880 34 34 } 35 35 36 public void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations ) {36 public void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations, string targetVariable) { 37 37 var symbolicModel = (ISymbolicDataAnalysisModel)model; 38 38 39 39 foreach (var transformation in transformations) { 40 ApplyBacktransformation(transformation, symbolicModel.SymbolicExpressionTree );40 ApplyBacktransformation(transformation, symbolicModel.SymbolicExpressionTree, targetVariable); 41 41 } 42 42 } 43 43 44 private void ApplyBacktransformation(ITransformation transformation, ISymbolicExpressionTree symbolicExpressionTree ) {44 private void ApplyBacktransformation(ITransformation transformation, ISymbolicExpressionTree symbolicExpressionTree, string targetVariable) { 45 45 var variableNodes = symbolicExpressionTree.IterateNodesBreadth() 46 46 .OfType<VariableTreeNode>() -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IModelBacktransformator.cs
r10869 r10880 25 25 namespace HeuristicLab.Problems.DataAnalysis { 26 26 public interface IModelBacktransformator { 27 void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations );27 void Backtransform(IDataAnalysisModel model, IEnumerable<ITransformation> transformations, string targetVariable); 28 28 } 29 29 }
Note: See TracChangeset
for help on using the changeset viewer.