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/VariableQualityImpactCalculator.cs

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