- Timestamp:
- 12/08/18 08:11:48 (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/2915-AbsoluteSymbol (added) merged: 15943-15944,16236-16240,16304,16306,16332,16344-16352,16355 /branches/2937_SymReg_AnalyticalQuotient (added) merged: 16083
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r15583 r16356 48 48 var mul = new Multiplication(); 49 49 var div = new Division(); 50 var aq = new AnalyticalQuotient(); 50 51 var mean = new Average(); 51 52 var sin = new Sine(); … … 53 54 var tan = new Tangent(); 54 55 var log = new Logarithm(); 56 var abs = new Absolute(); 55 57 var pow = new Power(); 56 58 pow.InitialFrequency = 0.0; 57 59 var square = new Square(); 58 60 square.InitialFrequency = 0.0; 61 var cube = new Cube(); 62 cube.InitialFrequency = 0.0; 59 63 var root = new Root(); 60 64 root.InitialFrequency = 0.0; 61 65 var sqrt = new SquareRoot(); 62 66 sqrt.InitialFrequency = 0.0; 67 var cubeRoot = new CubeRoot(); 68 cubeRoot.InitialFrequency = 0.0; 63 69 var airyA = new AiryA(); 64 70 airyA.InitialFrequency = 0.0; … … 123 129 autoregressiveVariable.Enabled = false; 124 130 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, 126 132 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral, 127 133 @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, 129 135 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral 130 136 }; 131 137 132 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };138 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition }; 133 139 var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor }; 134 140 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable }; -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
r15583 r16356 69 69 var root = new Root(); 70 70 var sqrt = new SquareRoot(); 71 var cube = new Cube(); 72 var cubeRoot = new CubeRoot(); 71 73 var exp = new Exponential(); 74 var abs = new Absolute(); 72 75 73 76 var airyA = new AiryA(); … … 86 89 var psi = new Psi(); 87 90 var sineIntegral = new SineIntegral(); 91 var analyticalQuotient = new AnalyticalQuotient(); 88 92 89 93 var @if = new IfThenElse(); … … 114 118 var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan }); 115 119 var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log }); 116 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { a iryA, 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}); 118 122 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable }); 119 123 var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols }); 120 124 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 }); 122 126 123 127 var conditionSymbols = new GroupSymbol(ConditionsName, new List<ISymbol> { @if, variableCondition }); … … 140 144 SetSubtreeCount(root, 2, 2); 141 145 SetSubtreeCount(square, 1, 1); 146 SetSubtreeCount(cube, 1, 1); 142 147 SetSubtreeCount(sqrt, 1, 1); 148 SetSubtreeCount(cubeRoot, 1, 1); 143 149 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 145 155 SetSubtreeCount(terminalSymbols, 0, 0); 146 156 … … 231 241 public void ConfigureAsDefaultRegressionGrammar() { 232 242 Symbols.First(s => s is Average).Enabled = false; 243 Symbols.First(s => s is Absolute).Enabled = false; 233 244 Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false; 234 245 Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false; … … 242 253 Symbols.First(s => s is VariableCondition).Enabled = false; 243 254 Symbols.First(s => s is Xor).Enabled = false; 255 Symbols.First(s => s is Absolute).Enabled = false; 244 256 Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false; 245 257 Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false; … … 251 263 public void ConfigureAsDefaultTimeSeriesPrognosisGrammar() { 252 264 Symbols.First(s => s is Average).Enabled = false; 265 Symbols.First(s => s is Absolute).Enabled = false; 253 266 Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false; 254 267 Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
Note: See TracChangeset
for help on using the changeset viewer.