Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/07/12 16:30:40 (11 years ago)
Author:
sforsten
Message:

#1942: training has now at least one sample

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs

    r8599 r8601  
    6868      var allowedInputVars = new List<string>();
    6969      var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3);
    70       foreach (var variableName in dataset.DoubleVariables) {
    71         if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
    72           variableName != targetVar)
    73           allowedInputVars.Add(variableName);
     70      if (trainingIndizes.Count() >= 2) {
     71        foreach (var variableName in dataset.DoubleVariables) {
     72          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
     73            variableName != targetVar)
     74            allowedInputVars.Add(variableName);
     75        }
     76      } else {
     77        allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => x.Equals(targetVar)));
    7478      }
    7579
Note: See TracChangeset for help on using the changeset viewer.