Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5897


Ignore:
Timestamp:
03/30/11 18:15:29 (13 years ago)
Author:
gkronber
Message:

#1453: fixed build fail by reverting unintentionally committed changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs

    r5894 r5897  
    208208          var variableTreeNode = instr.dynamicNode as VariableTreeNode;
    209209          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
    210           instr.dArg0 = variableTreeNode.Weight;
     210          code[i] = instr;
    211211        } else if (instr.opCode == OpCodes.LagVariable) {
    212212          var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
    213213          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
    214           instr.dArg0 = variableTreeNode.Weight;
     214          code[i] = instr;
    215215        } else if (instr.opCode == OpCodes.VariableCondition) {
    216216          var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode;
    217217          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableConditionTreeNode.VariableName);
    218           instr.dArg0 = variableConditionTreeNode.Threshold;
    219         } else if (instr.opCode == OpCodes.Constant) {
    220           var constTreeNode = instr.dynamicNode as ConstantTreeNode;
    221           instr.dArg0 = constTreeNode.Value;
    222218        }
    223219      }
     
    412408          }
    413409        case OpCodes.Variable: {
    414             return dataset[row, currentInstr.iArg0] * currentInstr.dArg0;
     410            var variableTreeNode = currentInstr.dynamicNode as VariableTreeNode;
     411            return dataset[row, currentInstr.iArg0] * variableTreeNode.Weight;
    415412          }
    416413        case OpCodes.LagVariable: {
     
    418415            int actualRow = row + laggedVariableTreeNode.Lag;
    419416            if (actualRow < 0 || actualRow >= dataset.Rows) throw new ArgumentException("Out of range access to dataset row: " + row);
    420             return dataset[actualRow, currentInstr.iArg0] * currentInstr.dArg0;
     417            return dataset[actualRow, currentInstr.iArg0] * laggedVariableTreeNode.Weight;
    421418          }
    422419        case OpCodes.Constant: {
    423             return currentInstr.dArg0;
     420            var constTreeNode = currentInstr.dynamicNode as ConstantTreeNode;
     421            return constTreeNode.Value;
    424422          }
    425423
     
    429427            var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
    430428            double variableValue = dataset[row, currentInstr.iArg0];
    431             double x = variableValue - currentInstr.dArg0;
     429            double x = variableValue - variableConditionTreeNode.Threshold;
    432430            double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
    433431
Note: See TracChangeset for help on using the changeset viewer.