Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TransformationToSymbolicTreeMapper.cs @ 10845

Last change on this file since 10845 was 10845, checked in by tsteinre, 10 years ago
  • created ITransformationMapper.cs
  • started implementing TransformationToSymbolicTreeMapper
File size: 2.9 KB
RevLine 
[10845]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
23using HeuristicLab.Problems.DataAnalysis.Transformations;
24
25namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
26  public class TransformationToSymbolicTreeMapper : ITransformationMapper<ISymbolicExpressionTree> {
27    #region ITransformationMapper<ISymbolicExpressionTree> Members
28
29    public ISymbolicExpressionTree GenerateModel(ITransformation transformation) {
30      var tree = CreateNewTree();
31      var column = transformation.Column;
32
33      if (transformation is LinearTransformation) {
34        var kValue = ((LinearTransformation)transformation).Multiplier;
35        var multiplicationNode = new Multiplication().CreateTreeNode();
36        var kNode = new Constant();
37      } else if (transformation is ExponentialTransformation) {
38
39      } else if (transformation is LogarithmicTransformation) {
40
41      } else if (transformation is PowerTransformation) {
42
43      } else if (transformation is ReciprocalTransformation) {
44
45      } else if (transformation is ShiftStandardDistributionTransformation) {
46
47      }
48
49      //var variableNode = (VariableTreeNode)new Variable("dummy", "dummy description").CreateTreeNode();
50      //variableNode.VariableName = "dummy";
51      //tree.Root.AddSubtree(variableNode);
52
53      return tree;
54    }
55
56    public ISymbolicExpressionTree GenerateInverseModel(ITransformation transformation) {
57      var tree = CreateNewTree();
58      var column = transformation.Column;
59
60      if (transformation is LinearTransformation) {
61
62      } else if (transformation is ExponentialTransformation) {
63
64      } else if (transformation is LogarithmicTransformation) {
65
66      } else if (transformation is PowerTransformation) {
67
68      } else if (transformation is ReciprocalTransformation) {
69
70      } else if (transformation is ShiftStandardDistributionTransformation) {
71
72      }
73
74      return tree;
75    }
76
77    #endregion
78
79    private ISymbolicExpressionTree CreateNewTree() {
80      return new SymbolicExpressionTree(new ProgramRootSymbol().CreateTreeNode());
81    }
82  }
83}
Note: See TracBrowser for help on using the repository browser.