VegasGridOptimizer¶
- class madspace.VegasGridOptimizer(self: madspace._madspace_py.VegasGridOptimizer, contexts: collections.abc.Sequence[madspace._madspace_py.Context], grid_name: str, damping: SupportsFloat)¶
Bases:
pybind11_objectRefines a VegasMapping grid from accumulated bin statistics.
The training-time counterpart of VegasHistogram — add_data feeds in the per-bin weight sums accumulated during a warm-up run, and optimize rewrites the
grid_nameglobal on every context incontextswith the refined grid.- Parameters:
contexts – Contexts sharing the grid to refine.
grid_name – Global name of the VEGAS grid.
damping – Damping factor limiting the size of a single update.
- add_data(self: madspace._madspace_py.VegasGridOptimizer, values: object, counts: object) None¶
Accumulate one batch of per-bin
weightsandinputs; see VegasHistogram.
- optimize(self: madspace._madspace_py.VegasGridOptimizer) None¶
Refine the grid from the accumulated data and write it back to every context.