Package ai.djl.basicdataset.tabular
Class AmesRandomAccess.Builder
java.lang.Object
ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T>
ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder<T>
ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder<AmesRandomAccess.Builder>
ai.djl.basicdataset.tabular.AmesRandomAccess.Builder
- Enclosing class:
- AmesRandomAccess
public static final class AmesRandomAccess.Builder
extends CsvDataset.CsvBuilder<AmesRandomAccess.Builder>
A builder to construct a
AmesRandomAccess
.-
Field Summary
Fields inherited from class ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder
csvFormat, csvUrl
Fields inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
allowNoLabels, features, labels
Fields inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder
dataBatchifier, device, labelBatchifier, limit, pipeline, prefetchNumber, sampler, targetPipeline
-
Method Summary
Modifier and TypeMethodDescriptionAdds all features to the features set.addFeature
(String name) Adds a feature to the features set.addFeature
(String name, boolean onehotEncode) Adds a feature to the features set with onehot encoding.build()
Builds the newAmesRandomAccess
.Returns the available features of this dataset.optArtifactId
(String artifactId) Sets the optional artifactId.optGroupId
(String groupId) Sets optional groupId.optRepository
(ai.djl.repository.Repository repository) Sets the optional repository.optUsage
(ai.djl.training.dataset.Dataset.Usage usage) Sets the optional usage.self()
Methods inherited from class ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder
optCsvFile, optCsvUrl, setCsvFormat
Methods inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
addCategoricalFeature, addCategoricalFeature, addCategoricalFeature, addCategoricalLabel, addCategoricalLabel, addCategoricalLabel, addFeature, addLabel, addNumericFeature, addNumericFeature, addNumericLabel, addNumericLabel, noLabels
Methods inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder
addTargetTransform, addTransform, getSampler, optDataBatchifier, optDevice, optLabelBatchifier, optLimit, optPipeline, optPrefetchNumber, optTargetPipeline, setSampling, setSampling, setSampling
-
Method Details
-
self
- Overrides:
self
in classCsvDataset.CsvBuilder<AmesRandomAccess.Builder>
-
optUsage
Sets the optional usage.- Parameters:
usage
- the new usage- Returns:
- this builder
-
optRepository
Sets the optional repository.- Parameters:
repository
- the repository- Returns:
- this builder
-
optGroupId
Sets optional groupId.- Parameters:
groupId
- the groupId}- Returns:
- this builder
-
optArtifactId
Sets the optional artifactId.- Parameters:
artifactId
- the artifactId- Returns:
- this builder
-
addFeature
Adds a feature to the features set.- Parameters:
name
- the name of the feature- Returns:
- this builder
-
addFeature
Adds a feature to the features set with onehot encoding.- Parameters:
name
- the name of the featureonehotEncode
- true if use onehot encoding- Returns:
- this builder
-
addAllFeatures
Adds all features to the features set.- Returns:
- this builder
-
getAvailableFeatures
Returns the available features of this dataset.- Returns:
- a list of feature names
-
build
Builds the newAmesRandomAccess
.- Overrides:
build
in classCsvDataset.CsvBuilder<AmesRandomAccess.Builder>
- Returns:
- the new
AmesRandomAccess
-