- Timestamp:
- 04/19/10 10:18:15 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Instruction.cs
r3376 r3409 35 35 Div, 36 36 Call, 37 Arg, 37 38 Values, 38 39 Dynamic -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs
r3376 r3409 47 47 } 48 48 49 public SymbolicExpressionTreeNode ResultProducingExpression {50 get { return root.SubTrees[0].SubTrees[0]; }51 }52 53 49 public int Size { 54 50 get { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCompiler.cs
r3376 r3409 37 37 {typeof(Division), CodeSymbol.Div}, 38 38 {typeof(InvokeFunction), CodeSymbol.Call}, 39 {typeof(Argument), CodeSymbol.Arg}, 39 40 //{typeof(Values), CodeSymbol.Values} 40 41 }; … … 45 46 entryPoint.Clear(); 46 47 // compile main body 47 code.AddRange(Compile(tree.R esultProducingExpression));48 code.AddRange(Compile(tree.Root.SubTrees[0])); 48 49 // compile branches 49 50 var functionBranches = from node in tree.IterateNodesPrefix() … … 67 68 var invokeNode = (InvokeFunctionTreeNode)node; 68 69 instr.iArg0 = entryPoint[invokeNode.Symbol.FunctionName]; 70 } else if (instr.symbol == CodeSymbol.Arg) { 71 var argNode = (ArgumentTreeNode)node; 72 instr.iArg0 = (short)argNode.Symbol.ArgumentIndex; 69 73 } 70 74 } else { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r3373 r3409 141 141 SymbolicExpressionTreeCreator creator = new ProbabilisticTreeCreator(); 142 142 var evaluator = new SymbolicRegressionMeanSquaredErrorEvaluator(); 143 var grammar = new ArithmeticExpressionGrammar();143 var grammar = new GlobalSymbolicExpressionGrammar(new ArithmeticExpressionGrammar()); 144 144 Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the error of the regression model should be minimized.", new BoolValue(false))); 145 145 Parameters.Add(new ValueParameter<SymbolicExpressionTreeCreator>("SolutionCreator", "The operator which should be used to create new symbolic regression solutions.", creator)); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionEvaluator.cs
r3377 r3409 44 44 this.row = row; 45 45 pc = 0; 46 arguments.Clear(); 46 47 var estimatedValue = Evaluate(); 47 48 if (double.IsNaN(estimatedValue) || double.IsInfinity(estimatedValue)) yield return 0.0; … … 50 51 } 51 52 53 private List<double> arguments = new List<double>(); 52 54 public double Evaluate() { 53 55 var currentInstr = code[pc++]; … … 81 83 return p; 82 84 } 85 case CodeSymbol.Call: { 86 // save current arguments 87 var oldArgs = new List<double>(arguments); 88 arguments.Clear(); 89 // evaluate sub-trees 90 for (int i = 0; i < currentInstr.nArguments; i++) { 91 arguments.Add(Evaluate()); 92 } 93 // save the pc 94 int nextPc = pc; 95 // set pc to start of function 96 pc = currentInstr.iArg0; 97 // evaluate the function 98 double v = Evaluate(); 99 // restore the pc => evaluation will continue at point after my subtrees 100 pc = nextPc; 101 // restore arguments 102 arguments = oldArgs; 103 return v; 104 } 105 case CodeSymbol.Arg: { 106 return arguments[currentInstr.iArg0]; 107 } 83 108 case CodeSymbol.Dynamic: { 84 109 var variableTreeNode = currentInstr.dynamicNode as VariableTreeNode; -
trunk/sources/HeuristicLab/Files.x86.txt
r2691 r3409 2 2 ; This file contains a list of all x86 specific files 3 3 4 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceca35.dll5 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlcecompact35.dll6 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceer35EN.dll7 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceme35.dll8 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceoledb35.dll9 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceqp35.dll10 HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlcese35.dll4 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceca35.dll 5 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlcecompact35.dll 6 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceer35EN.dll 7 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceme35.dll 8 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceoledb35.dll 9 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlceqp35.dll 10 ;HeuristicLab.ExtLibs\HeuristicLab.SQLServerCompact\3.5.1.0\x86\sqlcese35.dll 11 11 12 HeuristicLab.ExtLibs\HeuristicLab.SQLite\1.0.65.0\x86\System.Data.SQLite.dll12 ;HeuristicLab.ExtLibs\HeuristicLab.SQLite\1.0.65.0\x86\System.Data.SQLite.dll
Note: See TracChangeset
for help on using the changeset viewer.