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 aCsvDataset
.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.csv.CSVFormat
csvFormat
protected java.net.URL
csvUrl
-
Fields inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
allowNoLabels, features, labels
-
-
Constructor Summary
Constructors Constructor Description CsvBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CsvDataset
build()
Builds the newCsvDataset
.T
optCsvFile(java.nio.file.Path csvFile)
Sets the optional CSV file path.T
optCsvUrl(java.lang.String csvUrl)
Sets the optional CSV file URL.protected T
self()
T
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, noLabels
-
-
-
-
Method Detail
-
self
protected T self()
- Specified by:
self
in classai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T extends CsvDataset.CsvBuilder<T>>
-
optCsvFile
public T optCsvFile(java.nio.file.Path csvFile)
Sets the optional CSV file path.- Parameters:
csvFile
- the CSV file path- Returns:
- this builder
-
optCsvUrl
public T optCsvUrl(java.lang.String csvUrl)
Sets the optional CSV file URL.- Parameters:
csvUrl
- the CSV file URL- Returns:
- this builder
-
setCsvFormat
public T setCsvFormat(org.apache.commons.csv.CSVFormat csvFormat)
Sets the CSV file format.- Parameters:
csvFormat
- theCSVFormat
- Returns:
- this builder
-
build
public CsvDataset build()
Builds the newCsvDataset
.- Returns:
- the new
CsvDataset
-
-