Package ai.djl.timeseries.distribution
Class Distribution.DistributionBuilder<T extends Distribution.DistributionBuilder<T>>
java.lang.Object
ai.djl.timeseries.distribution.Distribution.DistributionBuilder<T>
- Type Parameters:
T
- the concrete builder type
- Direct Known Subclasses:
NegativeBinomial.Builder
,StudentT.Builder
- Enclosing class:
- Distribution
public abstract static class Distribution.DistributionBuilder<T extends Distribution.DistributionBuilder<T>>
extends Object
A builder to extend for all classes extend the
Distribution
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Distribution
build()
Build aDistribution
.optLoc
(ai.djl.ndarray.NDArray loc) Set the affine location of the probability.optScale
(ai.djl.ndarray.NDArray scale) Set the affine scale for the probability distribution.protected abstract T
self()
setDistrArgs
(ai.djl.ndarray.NDList distrArgs) Set the appropriate arguments for the probability distribution.
-
Field Details
-
distrArgs
protected ai.djl.ndarray.NDList distrArgs -
scale
protected ai.djl.ndarray.NDArray scale -
loc
protected ai.djl.ndarray.NDArray loc
-
-
Constructor Details
-
DistributionBuilder
public DistributionBuilder()
-
-
Method Details
-
setDistrArgs
Set the appropriate arguments for the probability distribution.- Parameters:
distrArgs
- aNDList
containing distribution args named after the parameter name- Returns:
- this builder
-
optScale
Set the affine scale for the probability distribution.- Parameters:
scale
- the affine scale- Returns:
- this builder
-
optLoc
Set the affine location of the probability.- Parameters:
loc
- the affine location- Returns:
- this builder
-
build
Build aDistribution
.- Returns:
- the
Distribution
-
self
-