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

    r2419 r2440  
    5252    }
    5353
    54     public int TargetVariable {
    55       get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; }
    56       set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; }
     54    public string TargetVariable {
     55      get { return ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data; }
     56      set { ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data = value; }
    5757    }
    5858
     
    7878      }
    7979    }
    80     public IEnumerable<int> AllowedVariables {
     80    public IEnumerable<string> AllowedVariables {
    8181      get {
    82         ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
     82        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
    8383        return allowedVariables.Select(x => x.Data);
    8484      }
    8585      set {
    86         ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
    87         foreach (int x in value) allowedVariables.Add(new IntData(x));
     86        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
     87        foreach (string x in value) allowedVariables.Add(new StringData(x));
    8888      }
    8989    }
Note: See TracChangeset for help on using the changeset viewer.