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

    r2419 r2440  
    5252    }
    5353
    54     public virtual int TargetVariable {
    55       get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; }
    56       set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; }
     54    public virtual string TargetVariable {
     55      get { return ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data; }
     56      set { ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data = value; }
    5757    }
    5858
     
    7070      }
    7171    }
    72     public IEnumerable<int> AllowedVariables {
     72    public IEnumerable<string> AllowedVariables {
    7373      get {
    74         ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
     74        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
    7575        return allowedVariables.Select(x => x.Data);
    7676      }
    7777      set {
    78         ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
    79         foreach (int x in value) allowedVariables.Add(new IntData(x));
     78        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
     79        foreach (string x in value) allowedVariables.Add(new StringData(x));
    8080      }
    8181    }
Note: See TracChangeset for help on using the changeset viewer.