Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/08/18 08:11:48 (6 years ago)
Author:
gkronber
Message:

#2915: merged all changes from branch to trunk

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic

  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r15583 r16356  
    4848      var mul = new Multiplication();
    4949      var div = new Division();
     50      var aq = new AnalyticalQuotient();
    5051      var mean = new Average();
    5152      var sin = new Sine();
     
    5354      var tan = new Tangent();
    5455      var log = new Logarithm();
     56      var abs = new Absolute();
    5557      var pow = new Power();
    5658      pow.InitialFrequency = 0.0;
    5759      var square = new Square();
    5860      square.InitialFrequency = 0.0;
     61      var cube = new Cube();
     62      cube.InitialFrequency = 0.0;
    5963      var root = new Root();
    6064      root.InitialFrequency = 0.0;
    6165      var sqrt = new SquareRoot();
    6266      sqrt.InitialFrequency = 0.0;
     67      var cubeRoot = new CubeRoot();
     68      cubeRoot.InitialFrequency = 0.0;
    6369      var airyA = new AiryA();
    6470      airyA.InitialFrequency = 0.0;
     
    123129      autoregressiveVariable.Enabled = false;
    124130
    125       var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, square, pow, sqrt, root, exp,
     131      var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp,
    126132        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
    127133        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
    128       var unaryFunctionSymbols = new List<Symbol>() { square, sqrt, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
     134      var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
    129135        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
    130136      };
    131137
    132       var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };
     138      var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition };
    133139      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
    134140      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r15583 r16356  
    6969      var root = new Root();
    7070      var sqrt = new SquareRoot();
     71      var cube = new Cube();
     72      var cubeRoot = new CubeRoot();
    7173      var exp = new Exponential();
     74      var abs = new Absolute();
    7275
    7376      var airyA = new AiryA();
     
    8689      var psi = new Psi();
    8790      var sineIntegral = new SineIntegral();
     91      var analyticalQuotient = new AnalyticalQuotient();
    8892
    8993      var @if = new IfThenElse();
     
    114118      var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan });
    115119      var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log });
    116       var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
    117         fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral});
     120      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
     121        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient});
    118122      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });
    119123      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
    120124
    121       var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, pow, sqrt, root });
     125      var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, pow, sqrt, root, cube, cubeRoot });
    122126
    123127      var conditionSymbols = new GroupSymbol(ConditionsName, new List<ISymbol> { @if, variableCondition });
     
    140144      SetSubtreeCount(root, 2, 2);
    141145      SetSubtreeCount(square, 1, 1);
     146      SetSubtreeCount(cube, 1, 1);
    142147      SetSubtreeCount(sqrt, 1, 1);
     148      SetSubtreeCount(cubeRoot, 1, 1);
    143149      SetSubtreeCount(exponentialAndLogarithmicSymbols, 1, 1);
    144       SetSubtreeCount(specialFunctions, 1, 1);
     150      foreach(var sy in specialFunctions.Symbols.Except(new[] { analyticalQuotient})) {
     151        SetSubtreeCount(sy, 1, 1);
     152      }
     153      SetSubtreeCount(analyticalQuotient, 2, 2);
     154
    145155      SetSubtreeCount(terminalSymbols, 0, 0);
    146156
     
    231241    public void ConfigureAsDefaultRegressionGrammar() {
    232242      Symbols.First(s => s is Average).Enabled = false;
     243      Symbols.First(s => s is Absolute).Enabled = false;
    233244      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    234245      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
     
    242253      Symbols.First(s => s is VariableCondition).Enabled = false;
    243254      Symbols.First(s => s is Xor).Enabled = false;
     255      Symbols.First(s => s is Absolute).Enabled = false;
    244256      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    245257      Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false;
     
    251263    public void ConfigureAsDefaultTimeSeriesPrognosisGrammar() {
    252264      Symbols.First(s => s is Average).Enabled = false;
     265      Symbols.First(s => s is Absolute).Enabled = false;
    253266      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    254267      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
Note: See TracChangeset for help on using the changeset viewer.