public static class NUTS.NUTSBuilder
extends java.lang.Object
Constructor and Description |
---|
NUTSBuilder() |
Modifier and Type | Method and Description |
---|---|
NUTS.NUTSBuilder |
adaptCount(long adaptCount) |
NUTS.NUTSBuilder |
adaptPotentialEnabled(boolean adaptPotentialEnabled) |
NUTS.NUTSBuilder |
adaptStepSizeEnabled(boolean adaptEnabled) |
NUTS |
build() |
NUTS.NUTSBuilder |
initialStepSize(java.lang.Double initialStepSize) |
NUTS.NUTSBuilder |
maxEnergyChange(double maxEnergyChange) |
NUTS.NUTSBuilder |
maxTreeHeight(int maxTreeHeight) |
NUTS.NUTSBuilder |
potential(Potential potential) |
NUTS.NUTSBuilder |
random(KeanuRandom random) |
NUTS.NUTSBuilder |
saveStatistics(boolean saveStatistics) |
NUTS.NUTSBuilder |
targetAcceptanceProb(double targetAcceptanceProb) |
java.lang.String |
toString() |
public NUTS.NUTSBuilder random(KeanuRandom random)
public NUTS.NUTSBuilder targetAcceptanceProb(double targetAcceptanceProb)
targetAcceptanceProb
- The targeted acceptance rate for the step size adaption. This defaults to 0.8.public NUTS.NUTSBuilder adaptStepSizeEnabled(boolean adaptEnabled)
adaptEnabled
- Set to true if step size adaption is wanted.public NUTS.NUTSBuilder adaptCount(long adaptCount)
adaptCount
- The number of samples for which the step size and potential will be tuned. For the
remaining samples in which it is not tuned, the step size will be frozen to its last
calculated value.public NUTS.NUTSBuilder initialStepSize(java.lang.Double initialStepSize)
initialStepSize
- The initial step size. If this is null then a step size will be calculated using
heuristics.public NUTS.NUTSBuilder adaptPotentialEnabled(boolean adaptPotentialEnabled)
adaptPotentialEnabled
- Set to true if adapting of the mass matrix is wanted.public NUTS.NUTSBuilder potential(Potential potential)
potential
- provides mass in velocity and energy calculationspublic NUTS.NUTSBuilder maxEnergyChange(double maxEnergyChange)
maxEnergyChange
- The maximum energy change for a step to be considered divergent.public NUTS.NUTSBuilder maxTreeHeight(int maxTreeHeight)
maxTreeHeight
- The maximum tree size for the sampler. This controls how long a sample walk can
be before it terminates. This will set at a maximum approximately 2^treeSize
number of logProb evaluations for a sample.public NUTS.NUTSBuilder saveStatistics(boolean saveStatistics)
saveStatistics
- Set to true if sampling statistics are wanted. Sets whether or not to save
debug STATISTICS. The STATISTICS available are: Step size, Log Prob,
Mean Tree Acceptance Prob, Tree Size.public NUTS build()
public java.lang.String toString()
toString
in class java.lang.Object