VegasHistogram

class VegasHistogram : public madspace::FunctionGenerator

Per-bin weight accumulator that adapts a VegasMapping grid.

During the warm-up run it sums the sample weights falling in each bin of each dimension. The accumulated values and counts are then used to refine the VEGAS grid (Sec. 3.2.2 of [1]).

batch is the leading batch dimension.

Arguments

  • latent – float, shape (batch, dimension) – the sampled coordinates.

  • weights – float, shape (batch,) – the per-sample weights.

Returns

  • values – float, shape (dimension, bin_count) – summed weight per bin.

  • counts – int, shape (dimension, bin_count) – sample count per bin.

References

Public Functions

VegasHistogram(std::size_t dimension, std::size_t bin_count)
Parameters:
  • dimension – Number of dimensions.

  • bin_count – Number of grid bins per dimension.