Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/20/09 11:20:13 (15 years ago)
Author:
gkronber
Message:

Fixed #784 (ProblemInjector should be changed to read variable names instead of indexes for input and target variables)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HL3TreeEvaluatorInjector.cs

    r2327 r2440  
    3737      AddVariableInfo(new VariableInfo("TrainingSamplesStart", "Start index of training set", typeof(DoubleData), VariableKind.In));
    3838      AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "End index of training set", typeof(DoubleData), VariableKind.In));
    39       AddVariableInfo(new VariableInfo("TargetVariable", "Index of the target variable", typeof(IntData), VariableKind.In));
     39      AddVariableInfo(new VariableInfo("TargetVariable", "Name of the target variable", typeof(StringData), VariableKind.In));
    4040      AddVariableInfo(new VariableInfo("PunishmentFactor", "The punishment factor limits the estimated values to a certain range", typeof(DoubleData), VariableKind.In));
    4141      AddVariableInfo(new VariableInfo("TreeEvaluator", "The tree evaluator to evaluate models", typeof(ITreeEvaluator), VariableKind.New));
     
    5151      int start = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data;
    5252      int end = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data;
    53       int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
     53      string targetVariable = GetVariableValue<StringData>("TargetVariable", scope, true).Data;
    5454      double mean = dataset.GetMean(targetVariable, start, end);
    5555      double range = dataset.GetRange(targetVariable, start, end);
Note: See TracChangeset for help on using the changeset viewer.