Package ai.djl.basicdataset.tabular
Class CsvDataset.CsvBuilder<T extends CsvDataset.CsvBuilder<T>>
java.lang.Object
ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T>
ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder<T>
ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder<T>
- Direct Known Subclasses:
AirfoilRandomAccess.Builder,AmazonReview.Builder,AmesRandomAccess.Builder,DailyDelhiClimate.Builder,MovieLens100k.Builder
- Enclosing class:
- CsvDataset
public static class CsvDataset.CsvBuilder<T extends CsvDataset.CsvBuilder<T>>
extends TabularDataset.BaseBuilder<T>
Used to build a
CsvDataset.-
Field Summary
FieldsFields inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
allowNoLabels, features, labelsFields inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder
dataBatchifier, device, labelBatchifier, limit, pipeline, prefetchNumber, sampler, targetPipeline -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the newCsvDataset.optCsvFile(Path csvFile) Sets the optional CSV file path.Sets the optional CSV file URL.protected Tself()setCsvFormat(org.apache.commons.csv.CSVFormat csvFormat) Sets the CSV file format.Methods inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
addCategoricalFeature, addCategoricalFeature, addCategoricalFeature, addCategoricalLabel, addCategoricalLabel, addCategoricalLabel, addFeature, addLabel, addNumericFeature, addNumericFeature, addNumericLabel, addNumericLabel, noLabelsMethods inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder
addTargetTransform, addTransform, getSampler, optDataBatchifier, optDevice, optLabelBatchifier, optLimit, optPipeline, optPrefetchNumber, optTargetPipeline, setSampling, setSampling, setSampling
-
Field Details
-
csvUrl
-
csvFormat
protected org.apache.commons.csv.CSVFormat csvFormat
-
-
Constructor Details
-
CsvBuilder
public CsvBuilder()
-
-
Method Details
-
self
- Specified by:
selfin classai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T extends CsvDataset.CsvBuilder<T>>
-
optCsvFile
Sets the optional CSV file path.- Parameters:
csvFile- the CSV file path- Returns:
- this builder
-
optCsvUrl
Sets the optional CSV file URL.- Parameters:
csvUrl- the CSV file URL- Returns:
- this builder
-
setCsvFormat
Sets the CSV file format.- Parameters:
csvFormat- theCSVFormat- Returns:
- this builder
-
build
Builds the newCsvDataset.- Returns:
- the new
CsvDataset
-