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/Classification/CSV/ClassifiactionCSVInstanceProvider.cs

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