Package jdistlib.inference
Class ModelEvaluator
java.lang.Object
jdistlib.inference.ModelEvaluator
- All Implemented Interfaces:
DifferentiableLogDensity,GradientProvider,LogDensity
public final class ModelEvaluator
extends Object
implements DifferentiableLogDensity, GradientProvider
Non-thread-safe allocation-free evaluator intended for one sampler chain.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandoublelogDensity(double[] state) doublelogDensityAndGradient(double[] state, double[] gradient) Evaluates the log density and replacesgradientwith its gradient.
-
Method Details
-
hasAnalyticGradient
public boolean hasAnalyticGradient()- Specified by:
hasAnalyticGradientin interfaceGradientProvider
-
logDensity
public double logDensity(double[] state) - Specified by:
logDensityin interfaceDifferentiableLogDensity- Specified by:
logDensityin interfaceLogDensity
-
logDensityAndGradient
public double logDensityAndGradient(double[] state, double[] gradient) Description copied from interface:DifferentiableLogDensityEvaluates the log density and replacesgradientwith its gradient.- Specified by:
logDensityAndGradientin interfaceDifferentiableLogDensity
-