Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/31/20 12:42:47 (5 years ago)
Author:
pfleck
Message:

#3040 Started adding UCI time series regression benchmarks.
Adapted parser (extracted format options & added parsing for double vectors).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/PennML/PennMLRegressionInstanceProvider.cs

    r17180 r17414  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Globalization;
    2524using System.IO;
    2625using System.IO.Compression;
     
    5756      using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
    5857        foreach (var entry in instancesZipFile.Entries) {
    59           NumberFormatInfo numberFormat;
    60           DateTimeFormatInfo dateFormat;
    61           char separator;
    62           using (var stream = entry.Open()) {
    63             // the method below disposes the stream
    64             TableFileParser.DetermineFileFormat(stream, out numberFormat, out dateFormat, out separator);
    65           }
     58          var formatOptions = GetFormatOptions(entry);
    6659
    6760          using (var stream = entry.Open()) {
     
    7063
    7164              // by convention each dataset from the PennML collection reserves the last column for the target
    72               var variableNames = header.Split(separator);
     65              var variableNames = header.Split(formatOptions.ColumnSeparator);
    7366              var allowedInputVariables = variableNames.Take(variableNames.Length - 1);
    7467              var target = variableNames.Last();
Note: See TracChangeset for help on using the changeset viewer.