CSVDataLoader

public struct CSVDataLoader : S5TFDataLoader

Undocumented

  • Undocumented

    Declaration

    Swift

    public let batchSize: Int?
  • Undocumented

    Declaration

    Swift

    public let count: Int
  • Undocumented

    Declaration

    Swift

    public let numberOfFeatures: Int

Initializers.

  • Create a data loader from a comma seperated value (CSV) file.

    Declaration

    Swift

    public init(fromFileAt fileURL: URL,
                columnNames: [String]? = nil,
                featureColumnNames: [String] = [],
                labelColumnNames: [String] = [])

    Parameters

    columnNames

    the columns of the csv file. If these are supplied, we assume the CSV does not have column names.

    featureColumnNames

    the columns to use as feature names. If this array is empty no feature names will be used and all columns except labelColumnNames will be used as features.

    labelColumnNames

    the name of the columns to use labels. Those will be converted to integers. If no label names are supplied, the columns will be used as features, other columns will be labels. If no column names are supplied either, all columns are interpreted as features.

    batchSize

    the batch size. 1 by default.

Modifiers

  • Undocumented

    Declaration

    Swift

    public func batched(_ batchSize: Int) -> CSVDataLoader

Iterator