Index: trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2431)
+++ trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2440)
@@ -52,7 +52,7 @@
     }
 
-    public virtual int TargetVariable {
-      get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; }
-      set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; }
+    public virtual string TargetVariable {
+      get { return ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data; }
+      set { ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data = value; }
     }
 
@@ -70,12 +70,12 @@
       }
     }
-    public IEnumerable<int> AllowedVariables {
+    public IEnumerable<string> AllowedVariables {
       get {
-        ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
+        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
         return allowedVariables.Select(x => x.Data);
       }
       set {
-        ItemList<IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);
-        foreach (int x in value) allowedVariables.Add(new IntData(x));
+        ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false);
+        foreach (string x in value) allowedVariables.Add(new StringData(x));
       }
     }
Index: trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs	(revision 2431)
+++ trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegressionOperator.cs	(revision 2440)
@@ -37,5 +37,5 @@
 
     public LinearRegressionOperator() {
-      AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("TargetVariable", "Name of the target variable", typeof(StringData), VariableKind.In));
       AddVariableInfo(new VariableInfo("Dataset", "Dataset with all samples on which to apply the function", typeof(Dataset), VariableKind.In));
       AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
@@ -47,6 +47,7 @@
 
     public override IOperation Apply(IScope scope) {
-      int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
       Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true);
+      string targetVariable = GetVariableValue<StringData>("TargetVariable", scope, true).Data;
+      int targetVariableIndex = dataset.GetVariableIndex(targetVariable);
       int start = GetVariableValue<IntData>("SamplesStart", scope, true).Data;
       int end = GetVariableValue<IntData>("SamplesEnd", scope, true).Data;
@@ -56,9 +57,9 @@
       int minTimeOffset = minTimeOffsetData == null ? 0 : minTimeOffsetData.Data;
 
-      List<int> allowedColumns = CalculateAllowedColumns(dataset, targetVariable, start, end);
-      List<int> allowedRows = CalculateAllowedRows(dataset, targetVariable, allowedColumns, start, end, minTimeOffset, maxTimeOffset);
+      List<int> allowedColumns = CalculateAllowedColumns(dataset, targetVariableIndex, start, end);
+      List<int> allowedRows = CalculateAllowedRows(dataset, targetVariableIndex, allowedColumns, start, end, minTimeOffset, maxTimeOffset);
 
       double[,] inputMatrix = PrepareInputMatrix(dataset, allowedColumns, allowedRows, minTimeOffset, maxTimeOffset);
-      double[] targetVector = PrepareTargetVector(dataset, targetVariable, allowedRows);
+      double[] targetVector = PrepareTargetVector(dataset, targetVariableIndex, allowedRows);
       double[] coefficients = CalculateCoefficients(inputMatrix, targetVector);
       IFunctionTree tree = CreateModel(coefficients, allowedColumns.Select(i => dataset.GetVariableName(i)).ToList(), minTimeOffset, maxTimeOffset);
