Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/28/19 11:22:24 (6 years ago)
Author:
msemenki
Message:

#2988: Add first version of GP for Evolvment models of models.

Location:
branches/2988_ModelsOfModels2
Files:
1 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic

  • branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r16565 r16722  
    5555      var log = new Logarithm();
    5656      var abs = new Absolute();
     57      var tanh = new HyperbolicTangent();
    5758      var pow = new Power();
    5859      pow.InitialFrequency = 0.0;
     
    120121      constant.MinValue = -20;
    121122      constant.MaxValue = 20;
     123
     124      var treeModel = new TreeModel();
     125
    122126      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
    123127      var binFactorVariable = new BinaryFactorVariable();
     
    129133      autoregressiveVariable.Enabled = false;
    130134
    131       var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp,
     135      var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, tanh,
    132136        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
    133137        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
    134       var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
     138      var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative,
    135139        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
    136140      };
     
    138142      var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition };
    139143      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
    140       var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };
     144      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable, treeModel };
    141145
    142146      foreach (var symb in allSymbols)
  • branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r16565 r16722  
    8585      var gamma = new Gamma();
    8686      var hypCosineIntegral = new HyperbolicCosineIntegral();
     87      var tanh = new HyperbolicTangent();
    8788      var hypSineIntegral = new HyperbolicSineIntegral();
    8889      var norm = new Norm();
     
    107108      constant.MinValue = -20;
    108109      constant.MaxValue = 20;
     110
    109111      var variableSymbol = new Variable();
    110112      var binFactorVariable = new BinaryFactorVariable();
     
    112114      var laggedVariable = new LaggedVariable();
    113115      var autoregressiveVariable = new AutoregressiveTargetVariable();
     116
     117      var treeModel = new TreeModel();
    114118      #endregion
    115119
    116120      #region group symbol declaration
    117121      var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div, mean });
    118       var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan });
    119       var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log });
     122      var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan, tanh});
     123      var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log});
    120124      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
    121125        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient});
    122       var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });
     126      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable, treeModel });
    123127      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
    124128
     
    242246      Symbols.First(s => s is Average).Enabled = false;
    243247      Symbols.First(s => s is Absolute).Enabled = false;
     248      Symbols.First(s => s is HyperbolicTangent).Enabled = false;
    244249      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    245250      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
     
    254259      Symbols.First(s => s is Xor).Enabled = false;
    255260      Symbols.First(s => s is Absolute).Enabled = false;
     261      Symbols.First(s => s is HyperbolicTangent).Enabled = false;
    256262      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    257263      Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false;
     
    264270      Symbols.First(s => s is Average).Enabled = false;
    265271      Symbols.First(s => s is Absolute).Enabled = false;
     272      Symbols.First(s => s is HyperbolicTangent).Enabled = false;
    266273      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    267274      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
Note: See TracChangeset for help on using the changeset viewer.