Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/05/12 10:50:54 (12 years ago)
Author:
sforsten
Message:

#1784: CSV files that contain columns with non-numeric data can be imported again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/ClassificationInstanceProvider.cs

    r7851 r7965  
    3636
    3737      Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);
    38       string targetVar = csvFileParser.VariableNames.Last();
    39       IEnumerable<string> allowedInputVars = csvFileParser.VariableNames.Where(x => !x.Equals(targetVar));
     38      string targetVar = csvFileParser.VariableNames.Where(x => dataset.DoubleVariables.Contains(x)).Last();
     39      IEnumerable<string> allowedInputVars = dataset.DoubleVariables.Where(x => !x.Equals(targetVar));
    4040
    4141      ClassificationProblemData claData = new ClassificationProblemData(dataset, allowedInputVars, targetVar);
Note: See TracChangeset for help on using the changeset viewer.