Changeset 9835 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter
- Timestamp:
- 08/01/13 13:01:40 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking
- Property svn:ignore
-
old new 1 *.suo 2 _ReSharper.HeuristicLab.Tracking 1 _ReSharper.Sliding Window GP 3 2 bin
-
- Property svn:mergeinfo changed
/branches/Sliding Window GP (added) merged: 7820,7837,7845,7850,9047,9126,9145,9162-9165 -
Property
svn:global-ignores
set to
_ReSharper.HeuristicLab.Tracking
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 merged eligible /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 merged eligible /branches/Benchmarking/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 6917-7005 /branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5471-5473 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5815-6180 /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5060 /branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 7098-8789 /branches/HeuristicLab.TreeSimplifier/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 8388-8942 /branches/NET40/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5138-5162 /branches/ParallelEngine/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 6828 /branches/SuccessProgressAnalysis/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5370-5682 /branches/Trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 6829-6865 /branches/VNS/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5594-5752 /branches/histogram/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs
r8436 r9835 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
r9241 r9835 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 105 105 { typeof(AutoregressiveTargetVariable),OpCodes.LagVariable}, 106 106 { typeof(Constant), OpCodes.Constant }, 107 // { typeof(IntegerConstant), OpCodes.Constant},108 107 { typeof(Argument), OpCodes.Arg }, 109 108 { typeof(Power),OpCodes.Power}, -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r8798 r9835 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 168 168 if (instr.opCode == OpCodes.Variable) { 169 169 var variableTreeNode = (VariableTreeNode)instr.dynamicNode; 170 instr. iArg0= doubleVariableNames[variableTreeNode.VariableName];170 instr.data = doubleVariableNames[variableTreeNode.VariableName]; 171 171 } else if (instr.opCode == OpCodes.LagVariable) { 172 172 var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode; 173 instr. iArg0= doubleVariableNames[laggedVariableTreeNode.VariableName];173 instr.data = doubleVariableNames[laggedVariableTreeNode.VariableName]; 174 174 } else if (instr.opCode == OpCodes.VariableCondition) { 175 175 var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode; 176 instr. iArg0= doubleVariableNames[variableConditionTreeNode.VariableName];176 instr.data = doubleVariableNames[variableConditionTreeNode.VariableName]; 177 177 } else if (instr.opCode == OpCodes.Call) { 178 178 necessaryArgStackSize += instr.nArguments + 1; … … 566 566 VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode; 567 567 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array 568 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr. iArg0);568 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.data); 569 569 // load correct column of the current variable 570 570 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref); … … 600 600 LaggedVariableTreeNode varNode = (LaggedVariableTreeNode)currentInstr.dynamicNode; 601 601 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array 602 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr. iArg0);602 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.data); 603 603 // load correct column of the current variable 604 604 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref); -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r9241 r9835 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 117 117 if (instr.opCode == OpCodes.Variable) { 118 118 var variableTreeNode = (VariableTreeNode)instr.dynamicNode; 119 instr. iArg0= dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);119 instr.data = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName); 120 120 } else if (instr.opCode == OpCodes.LagVariable) { 121 121 var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode; 122 instr. iArg0= dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);122 instr.data = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName); 123 123 } else if (instr.opCode == OpCodes.VariableCondition) { 124 124 var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode; 125 instr. iArg0= dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);125 instr.data = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName); 126 126 } else if (instr.opCode == OpCodes.Call) { 127 127 necessaryArgStackSize += instr.nArguments + 1; … … 132 132 133 133 134 p rotectedvirtual double Evaluate(Dataset dataset, ref int row, InterpreterState state) {134 public virtual double Evaluate(Dataset dataset, ref int row, InterpreterState state) { 135 135 Instruction currentInstr = state.NextInstruction(); 136 136 switch (currentInstr.opCode) { … … 406 406 int savedPc = state.ProgramCounter; 407 407 // set pc to start of function 408 state.ProgramCounter = (ushort)currentInstr. iArg0;408 state.ProgramCounter = (ushort)currentInstr.data; 409 409 // evaluate the function 410 410 double v = Evaluate(dataset, ref row, state); … … 418 418 } 419 419 case OpCodes.Arg: { 420 return state.GetStackFrameValue((ushort)currentInstr. iArg0);420 return state.GetStackFrameValue((ushort)currentInstr.data); 421 421 } 422 422 case OpCodes.Variable: { 423 423 if (row < 0 || row >= dataset.Rows) return double.NaN; 424 424 var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode; 425 return ((IList<double>)currentInstr. iArg0)[row] * variableTreeNode.Weight;425 return ((IList<double>)currentInstr.data)[row] * variableTreeNode.Weight; 426 426 } 427 427 case OpCodes.LagVariable: { … … 429 429 int actualRow = row + laggedVariableTreeNode.Lag; 430 430 if (actualRow < 0 || actualRow >= dataset.Rows) return double.NaN; 431 return ((IList<double>)currentInstr. iArg0)[actualRow] * laggedVariableTreeNode.Weight;431 return ((IList<double>)currentInstr.data)[actualRow] * laggedVariableTreeNode.Weight; 432 432 } 433 433 case OpCodes.Constant: { … … 441 441 if (row < 0 || row >= dataset.Rows) return double.NaN; 442 442 var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode; 443 double variableValue = ((IList<double>)currentInstr. iArg0)[row];443 double variableValue = ((IList<double>)currentInstr.data)[row]; 444 444 double x = variableValue - variableConditionTreeNode.Threshold; 445 445 double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
Note: See TracChangeset
for help on using the changeset viewer.