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

    Fields
    Modifier and Type
    Field
    Description
    protected ai.djl.ndarray.NDList
     
    protected ai.djl.ndarray.NDArray
     
    protected ai.djl.ndarray.NDArray
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Distribution
    Build a Distribution.
    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
     
    setDistrArgs(ai.djl.ndarray.NDList distrArgs)
    Set the appropriate arguments for the probability distribution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public T setDistrArgs(ai.djl.ndarray.NDList distrArgs)
      Set the appropriate arguments for the probability distribution.
      Parameters:
      distrArgs - a NDList containing distribution args named after the parameter name
      Returns:
      this builder
    • optScale

      public T optScale(ai.djl.ndarray.NDArray scale)
      Set the affine scale for the probability distribution.
      Parameters:
      scale - the affine scale
      Returns:
      this builder
    • optLoc

      public T optLoc(ai.djl.ndarray.NDArray loc)
      Set the affine location of the probability.
      Parameters:
      loc - the affine location
      Returns:
      this builder
    • build

      public abstract Distribution build()
      Build a Distribution.
      Returns:
      the Distribution
    • self

      protected abstract T self()