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.Modeling/3.2/VariableEvaluationImpactCalculator.cs

    r2379 r2440  
    3737      AddVariableInfo(new VariableInfo("Predictor", "The predictor used to evaluate the model", typeof(IPredictor), VariableKind.In));
    3838      AddVariableInfo(new VariableInfo("Dataset", "Dataset", typeof(Dataset), VariableKind.In));
    39       AddVariableInfo(new VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), VariableKind.In));
     39      AddVariableInfo(new VariableInfo("TargetVariable", "TargetVariable", typeof(StringData), VariableKind.In));
    4040      AddVariableInfo(new VariableInfo("InputVariableNames", "Names of used variables in the model (optional)", typeof(ItemList<StringData>), VariableKind.In));
    4141      AddVariableInfo(new VariableInfo("SamplesStart", "TrainingSamplesStart", typeof(IntData), VariableKind.In));
     
    5151      IPredictor predictor = GetVariableValue<IPredictor>("Predictor", scope, true);
    5252      Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true);
    53       int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
    54       string targetVariableName = dataset.GetVariableName(targetVariable);
     53      string targetVariableName = GetVariableValue<StringData>("TargetVariable", scope, true).Data;
     54      int targetVariable = dataset.GetVariableIndex(targetVariableName);
    5555      ItemList<StringData> inputVariableNames = GetVariableValue<ItemList<StringData>>("InputVariableNames", scope, true, false);
    5656      int start = GetVariableValue<IntData>("SamplesStart", scope, true).Data;
Note: See TracChangeset for help on using the changeset viewer.