Note: Subject to change before the BAT.jl v3.0.0 release.
-
Support for DensityInterface: BAT will now accept any object that implements the DensityInterface API (specifically
DensityInterface.densitykind
andDensityInterface.logdensityof
) as likelihoods. In return, all BAT priors and posteriors support the DensityInterface API as well. -
Support for InverseFunctions and ChangesOfVariables: Parameter transformations in BAT now implement the DensityInterface API. Any function that supports
InverseFunctions.inverse
ChangesOfVariables.with_logabsdet_jacobian
output_shape = f(input_shape::ValueShapes.AbstractValueShape)::AbstractValueShape
can now be used as a parameter transformation in BAT.
-
AbstractVariateTransform
and the functionladjof
have been removed, BAT parameter transformation do not need to have a specific supertype any longer (see above). -
Pending:
LogDVal
will deprecated soon and removed before the BAT.jl v3.0.0 release. Instead oflikelihood = let data = mydata function(v) log_likelihood_value = ... return LogDVal(log_likelihood_value) end end
use the DensityInterface API (see above):
likelihood = let data = mydata logfuncdensity(function(v) log_likelihood_value = ... return log_likelihood_value end) end
or
struct MyLikeLihood{D} data::D end @inline DensityInterface.DensityKind(::MyLikeLihood) = IsDensity() function DensityInterface.logdensityof(likelihood::MyLikeLihood, v) log_likelihood_value = ... return log_likelihood_value end likelihood = MyLikeLihood(mydata)
This allows for defining likelihoods without depending on BAT. Avoid creating custom subtypes of
BAT.AbstractMeasureOrDensity
. -
New behavior of
ValueShapes.NamedTupleShape
andValueShapes.NamedTupleDist
: Due to changes in ValueShapes v0.10,NamedTupleShape
andNamedTupleDist
now either (by default) useNamedTuple
or (optionally)ValueShapes.ShapedAsNT
, but no longer a mix of them. As a result, the behavior of BAT has changed as well when using aNamedTupleDist
as a prior. For example,mode(samples).result
returns aNamedTuple
now directly. -
Use the new function
bat_report
to generate a sampling output report instead ofshow(BAT.SampledDensity(samples))
.
bat_rng
[@ref]BAT.EvalException
[@ref]BAT.DistributionTransform
[@ref]BAT.enable_error_log
[@ref]BAT.error_log
[@ref]BAT.LogUniform
[@ref]BAT.MultimodalStudentT
[@ref]BridgeSampling
[@ref]DifferentiationAlgorithm
[@ref]EllipsoidalNestedSampling
[@ref]ForwardDiffAD
[@ref]ReactiveNestedSampling
[@ref]renormalize_density
[@ref]truncate_density
[@ref]valgradof
[@ref]ZygoteAD
[@ref]