Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/15/16 20:09:41 (8 years ago)
Author:
gkronber
Message:

#2697:

  • renaming of folder "Transformation" to "Converters" to distinguish between transformations for variables (from data preprocessing) and classes for transformation of trees.
  • renamed SymbolicDataAnalysisExpressionTreeSimplifier -> TreeSimplifier
  • Implemented a converter to create a linar model as a symbolic expression tree
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
3 added
2 deleted
3 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeSimplifier.cs

    r14389 r14390  
    3030  /// Simplifier for symbolic expressions
    3131  /// </summary>
    32   public class SymbolicDataAnalysisExpressionTreeSimplifier {
     32  public class TreeSimplifier {
    3333    private Addition addSymbol = new Addition();
    3434    private Subtraction subSymbol = new Subtraction();
     
    716716        // fold constants
    717717        return MakeConstant(((ConstantTreeNode)a).Value / ((ConstantTreeNode)b).Value);
    718       } if (IsConstant(a) && !((ConstantTreeNode)a).Value.IsAlmost(1.0)) {
     718      }
     719      if (IsConstant(a) && !((ConstantTreeNode)a).Value.IsAlmost(1.0)) {
    719720        return MakeFraction(MakeConstant(1.0), MakeProduct(b, Invert(a)));
    720721      } else if (IsVariable(a) && IsConstant(b)) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs

    r14389 r14390  
    2727
    2828namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    29   public class TreeToAutoDiffTermTransformator {
     29  public class TreeToAutoDiffTermConverter {
    3030    public delegate double ParametricFunction(double[] vars, double[] @params);
    3131    public delegate Tuple<double[], double> ParametricFunctionGradient(double[] vars, double[] @params);
     
    6060
    6161      // use a transformator object which holds the state (variable list, parameter list, ...) for recursive transformation of the tree
    62       var transformator = new TreeToAutoDiffTermTransformator(makeVariableWeightsVariable);
     62      var transformator = new TreeToAutoDiffTermConverter(makeVariableWeightsVariable);
    6363      AutoDiff.Term term;
    6464      var success = transformator.TryTransformToAutoDiff(tree.Root.GetSubtree(0), out term);
     
    8888    private readonly bool makeVariableWeightsVariable;
    8989
    90     private TreeToAutoDiffTermTransformator(bool makeVariableWeightsVariable) {
     90    private TreeToAutoDiffTermConverter(bool makeVariableWeightsVariable) {
    9191      this.makeVariableWeightsVariable = makeVariableWeightsVariable;
    9292      this.variableNames = new List<string>();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs

    r14185 r14390  
    5151      while (dividend > 0) {
    5252        int modulo = (dividend - 1) % 26;
    53         columnName = Convert.ToChar(65 + modulo).ToString() + columnName;
     53        columnName = System.Convert.ToChar(65 + modulo).ToString() + columnName;
    5454        dividend = (int)((dividend - modulo) / 26);
    5555      }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r14378 r14390  
    137137      <SubType>Code</SubType>
    138138    </Compile>
     139    <Compile Include="Converters\Convert.cs" />
     140    <Compile Include="Converters\LinearModelToTreeConverter.cs" />
     141    <Compile Include="Converters\TreeSimplifier.cs" />
     142    <Compile Include="Converters\TreeToAutoDiffTermConverter.cs" />
    139143    <Compile Include="Formatters\InfixExpressionFormatter.cs" />
    140144    <Compile Include="Formatters\SymbolicDataAnalysisExpressionMathematicaFormatter.cs" />
     
    242246    <Compile Include="Symbols\VariableConditionTreeNode.cs" />
    243247    <Compile Include="Symbols\VariableTreeNode.cs" />
    244     <Compile Include="Transformation\SymbolicDataAnalysisExpressionTreeSimplifier.cs" />
    245     <Compile Include="Transformation\SymbolicExpressionTreeBacktransformator.cs" />
    246     <Compile Include="Transformation\TreeToAutoDiffTermTransformator.cs" />
    247     <Compile Include="Transformation\TransformationToSymbolicTreeMapper.cs" />
     248    <Compile Include="Transformations\SymbolicExpressionTreeBacktransformator.cs" />
     249    <Compile Include="Transformations\TransformationToSymbolicTreeMapper.cs" />
    248250    <Compile Include="TreeMatching\SymbolicExpressionTreeBottomUpSimilarityCalculator.cs" />
    249251    <Compile Include="TreeMatching\SymbolicExpressionTreeCanonicalSorter.cs" />
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplificationOperator.cs

    r14185 r14390  
    3737    }
    3838
    39     private readonly SymbolicDataAnalysisExpressionTreeSimplifier simplifier = new SymbolicDataAnalysisExpressionTreeSimplifier();
     39    private readonly TreeSimplifier simplifier = new TreeSimplifier();
    4040
    4141    [StorableConstructor]
Note: See TracChangeset for help on using the changeset viewer.