Problem
FixedNBins is available as a binning policy, and BinnedModeEstimator accepts it. Marginal-mode estimation then raises a MethodError. Automatic binning works on the same samples.
Impact
Users cannot select a fixed number of bins for marginal-mode estimation.
Reproduction
using BAT
ctx = BATContext()
samples = DensitySampleVector(
[[1.0], [2.0], [3.0], [4.0], [5.0]],
zeros(5),
)
bat_marginalmode(
samples,
BinnedModeEstimator(binning = FixedNBins(nbins = 2)),
ctx,
)
Output
MethodError: no method matching _get_bining_impl(::FixedNBins, ::Int64, ::Float64, ::Vector{Float64})
Expected result
Positive fixed bin counts should work through marginal-mode estimation and select the requested number of bins.
Related to #166.
Problem
FixedNBinsis available as a binning policy, andBinnedModeEstimatoraccepts it. Marginal-mode estimation then raises aMethodError. Automatic binning works on the same samples.Impact
Users cannot select a fixed number of bins for marginal-mode estimation.
Reproduction
Output
Expected result
Positive fixed bin counts should work through marginal-mode estimation and select the requested number of bins.
Related to #166.