Package ai.djl.basicdataset.tabular
Class AmesRandomAccess.Builder
- java.lang.Object
-
- ai.djl.training.dataset.RandomAccessDataset.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 aAmesRandomAccess.
-
-
Field Summary
-
Fields inherited from class ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder
csvFormat, csvUrl, features, labels
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmesRandomAccess.BuilderaddFeature(java.lang.String name)Adds a feature to the features set.AmesRandomAccess.BuilderaddFeature(java.lang.String name, boolean onehotEncode)Adds a feature to the features set with onehot encoding.AmesRandomAccessbuild()Builds the newAmesRandomAccess.java.util.List<java.lang.String>getAvailableFeatures()Returns the available features of this dataset.AmesRandomAccess.BuilderoptArtifactId(java.lang.String artifactId)Sets the optional artifactId.AmesRandomAccess.BuilderoptGroupId(java.lang.String groupId)Sets optional groupId.AmesRandomAccess.BuilderoptRepository(ai.djl.repository.Repository repository)Sets the optional repository.AmesRandomAccess.BuilderoptUsage(ai.djl.training.dataset.Dataset.Usage usage)Sets the optional usage.AmesRandomAccess.Builderself()-
Methods inherited from class ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder
addCategoricalFeature, addCategoricalFeature, addCategoricalLabel, addCategoricalLabel, addFeature, addLabel, addNumericFeature, addNumericLabel, optCsvFile, optCsvUrl, setCsvFormat
-
-
-
-
Method Detail
-
self
public AmesRandomAccess.Builder self()
- Overrides:
selfin classCsvDataset.CsvBuilder<AmesRandomAccess.Builder>
-
optUsage
public AmesRandomAccess.Builder optUsage(ai.djl.training.dataset.Dataset.Usage usage)
Sets the optional usage.- Parameters:
usage- the new usage- Returns:
- this builder
-
optRepository
public AmesRandomAccess.Builder optRepository(ai.djl.repository.Repository repository)
Sets the optional repository.- Parameters:
repository- the repository- Returns:
- this builder
-
optGroupId
public AmesRandomAccess.Builder optGroupId(java.lang.String groupId)
Sets optional groupId.- Parameters:
groupId- the groupId}- Returns:
- this builder
-
optArtifactId
public AmesRandomAccess.Builder optArtifactId(java.lang.String artifactId)
Sets the optional artifactId.- Parameters:
artifactId- the artifactId- Returns:
- this builder
-
addFeature
public AmesRandomAccess.Builder addFeature(java.lang.String name)
Adds a feature to the features set.- Parameters:
name- the name of the feature- Returns:
- this builder
-
addFeature
public AmesRandomAccess.Builder addFeature(java.lang.String name, boolean onehotEncode)
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
-
getAvailableFeatures
public java.util.List<java.lang.String> getAvailableFeatures()
Returns the available features of this dataset.- Returns:
- a list of feature names
-
build
public AmesRandomAccess build()
Builds the newAmesRandomAccess.- Overrides:
buildin classCsvDataset.CsvBuilder<AmesRandomAccess.Builder>- Returns:
- the new
AmesRandomAccess
-
-