LogisticSampler#
- class uvex_transients.phase_space.sampling.logistic.LogisticSampler(space: Space, center: Sequence[float], slope: Sequence[float])[source]#
Succeed with probability \(p(x)=\mathrm{expit}[\sum_i s_i (x_i - c_i)]\).
The boundary \(p=1/2\) is the plane through center that is perpendicular to slope, and slope sets how sharp it is.
- Parameters:
- Raises:
ValueError – If center or slope does not have one entry per axis.
Methods
annotate_map(ax, overlay)Draw the overlay of a sampler on the axes of a figure of its map.
describe(settings)Describe the map of a sampler in a few words, for the title of its figure.
draw(x, n, seed)Make n tries at a point.
draw_map(grid, points, path, title, *[, ...])Draw the fitted map of a sampler of this class and save the figure.
from_run_config(run, **options)Build a sampler from the arguments of a map in a run-config.
from_settings(settings, **context)Rebuild a sampler from settings.
kinds()Return the registered kinds this class is, the most specific first.
measure_overlay([n_draws, seed])Measure a population in the plane of the map, to be shaded on its figure.
probability(x)Return the probability of success at points of the space.
rate_products(rate)Return the quantities of a map that need a volumetric rate, such as the expected number of recoveries.
Attributes
Whether
measure_overlay()is implemented, for the callers that decide whether to ask for one.The name the class is registered under, which a file records.
The true probability, which a fitted map can be compared to.
The space, center and slope, as plain types.
The axes of the experiment.
What a figure of the map needs to label its axes, and what a comparison checks before it differences two.
The name of the
Scaleproduct that turns the success fraction into the quantity two maps are compared on (the volume-time, for a survey sampler: the recovered volume-time is its product with the fraction).