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

    r2419 r2440  
    3939    public override string Name { get { return "OffspringSelectionGP - StructureIdentification"; } }
    4040
    41     public virtual int TargetVariable {
    42       get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; }
    43       set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; }
     41    public virtual string TargetVariable {
     42      get { return ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data; }
     43      set { ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data = value; }
    4444    }
    4545
     
    5757      }
    5858    }
    59     public IEnumerable<int> AllowedVariables {
     59    public IEnumerable<string> AllowedVariables {
    6060      get {
    61         ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
     61        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
    6262        return allowedVariables.Select(x => x.Data);
    6363      }
    6464      set {
    65         ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
    66         foreach (int x in value) allowedVariables.Add(new IntData(x));
     65        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
     66        foreach (string x in value) allowedVariables.Add(new StringData(x));
    6767      }
    6868    }
Note: See TracChangeset for help on using the changeset viewer.