Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/13 13:01:40 (11 years ago)
Author:
bburlacu
Message:

#1772: Merged remaining trunk changes into the EvolutionaryTracking branch.

Location:
branches/HeuristicLab.EvolutionaryTracking
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking

  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic

  • 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.4mergedeligible
      /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4mergedeligible
      /branches/Benchmarking/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.46917-7005
      /branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.44656-4721
      /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45471-5473
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45815-6180
      /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Symbolic/3.44458-4459,​4462,​4464
      /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.46284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45060
      /branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.47098-8789
      /branches/HeuristicLab.TreeSimplifier/HeuristicLab.Problems.DataAnalysis.Symbolic/3.48388-8942
      /branches/NET40/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45138-5162
      /branches/ParallelEngine/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic/3.47568-7810
      /branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Symbolic/3.46350-6627
      /branches/Restructure trunk solution/HeuristicLab.Problems.DataAnalysis.Symbolic/3.46828
      /branches/SuccessProgressAnalysis/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45370-5682
      /branches/Trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.46829-6865
      /branches/VNS/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45594-5752
      /branches/histogram/HeuristicLab.Problems.DataAnalysis.Symbolic/3.45959-6341
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs

    r8436 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs

    r9241 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    105105      { typeof(AutoregressiveTargetVariable),OpCodes.LagVariable},
    106106      { typeof(Constant), OpCodes.Constant },
    107 //      { typeof(IntegerConstant), OpCodes.Constant},
    108107      { typeof(Argument), OpCodes.Arg },
    109108      { typeof(Power),OpCodes.Power},
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs

    r8798 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    168168        if (instr.opCode == OpCodes.Variable) {
    169169          var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
    170           instr.iArg0 = doubleVariableNames[variableTreeNode.VariableName];
     170          instr.data = doubleVariableNames[variableTreeNode.VariableName];
    171171        } else if (instr.opCode == OpCodes.LagVariable) {
    172172          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
    173           instr.iArg0 = doubleVariableNames[laggedVariableTreeNode.VariableName];
     173          instr.data = doubleVariableNames[laggedVariableTreeNode.VariableName];
    174174        } else if (instr.opCode == OpCodes.VariableCondition) {
    175175          var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode;
    176           instr.iArg0 = doubleVariableNames[variableConditionTreeNode.VariableName];
     176          instr.data = doubleVariableNames[variableConditionTreeNode.VariableName];
    177177        } else if (instr.opCode == OpCodes.Call) {
    178178          necessaryArgStackSize += instr.nArguments + 1;
     
    566566            VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode;
    567567            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);
    569569            // load correct column of the current variable
    570570            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
     
    600600            LaggedVariableTreeNode varNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
    601601            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);
    603603            // load correct column of the current variable
    604604            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs

    r9241 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    117117        if (instr.opCode == OpCodes.Variable) {
    118118          var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
    119           instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
     119          instr.data = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
    120120        } else if (instr.opCode == OpCodes.LagVariable) {
    121121          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
    122           instr.iArg0 = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);
     122          instr.data = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);
    123123        } else if (instr.opCode == OpCodes.VariableCondition) {
    124124          var variableConditionTreeNode = (VariableConditionTreeNode)instr.dynamicNode;
    125           instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
     125          instr.data = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
    126126        } else if (instr.opCode == OpCodes.Call) {
    127127          necessaryArgStackSize += instr.nArguments + 1;
     
    132132
    133133
    134     protected virtual double Evaluate(Dataset dataset, ref int row, InterpreterState state) {
     134    public virtual double Evaluate(Dataset dataset, ref int row, InterpreterState state) {
    135135      Instruction currentInstr = state.NextInstruction();
    136136      switch (currentInstr.opCode) {
     
    406406            int savedPc = state.ProgramCounter;
    407407            // set pc to start of function 
    408             state.ProgramCounter = (ushort)currentInstr.iArg0;
     408            state.ProgramCounter = (ushort)currentInstr.data;
    409409            // evaluate the function
    410410            double v = Evaluate(dataset, ref row, state);
     
    418418          }
    419419        case OpCodes.Arg: {
    420             return state.GetStackFrameValue((ushort)currentInstr.iArg0);
     420            return state.GetStackFrameValue((ushort)currentInstr.data);
    421421          }
    422422        case OpCodes.Variable: {
    423423            if (row < 0 || row >= dataset.Rows) return double.NaN;
    424424            var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode;
    425             return ((IList<double>)currentInstr.iArg0)[row] * variableTreeNode.Weight;
     425            return ((IList<double>)currentInstr.data)[row] * variableTreeNode.Weight;
    426426          }
    427427        case OpCodes.LagVariable: {
     
    429429            int actualRow = row + laggedVariableTreeNode.Lag;
    430430            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;
    432432          }
    433433        case OpCodes.Constant: {
     
    441441            if (row < 0 || row >= dataset.Rows) return double.NaN;
    442442            var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
    443             double variableValue = ((IList<double>)currentInstr.iArg0)[row];
     443            double variableValue = ((IList<double>)currentInstr.data)[row];
    444444            double x = variableValue - variableConditionTreeNode.Threshold;
    445445            double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
Note: See TracChangeset for help on using the changeset viewer.