Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/15 14:42:51 (10 years ago)
Author:
mkommend
Message:

#2273: Merged r11540 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.Instances.DataAnalysis

  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs

    r11335 r11876  
    6161
    6262      Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);
    63       string targetVar = dataset.DoubleVariables.Last();
    6463
    6564      // turn of input variables that are constant in the training partition
     
    6867      if (trainingIndizes.Count() >= 2) {
    6968        foreach (var variableName in dataset.DoubleVariables) {
    70           if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
    71             variableName != targetVar)
     69          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0)
    7270            allowedInputVars.Add(variableName);
    7371        }
    7472      } else {
    75         allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => !x.Equals(targetVar)));
     73        allowedInputVars.AddRange(dataset.DoubleVariables);
    7674      }
    7775
     
    9694
    9795      Dataset dataset = new Dataset(csvFileParser.VariableNames, values);
    98       string targetVar = dataset.DoubleVariables.Last();
    9996
    10097      // turn of input variables that are constant in the training partition
     
    104101      if (trainingIndizes.Count() >= 2) {
    105102        foreach (var variableName in dataset.DoubleVariables) {
    106           if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
    107             variableName != targetVar)
     103          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0)
    108104            allowedInputVars.Add(variableName);
    109105        }
    110106      } else {
    111         allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => !x.Equals(targetVar)));
     107        allowedInputVars.AddRange(dataset.DoubleVariables);
    112108      }
    113109
Note: See TracChangeset for help on using the changeset viewer.