InverseCDFSampler¶
-
class
gammapy.utils.random.InverseCDFSampler(pdf, axis=None, random_state=0)[source]¶ Bases:
objectInverse CDF sampler.
It determines a set of random numbers and calculate the cumulative distribution function.
- Parameters
- pdf
Map Map of the predicted source counts.
- axisint
Axis along which sampling the indexes.
- random_state{int, ‘random-seed’, ‘global-rng’,
RandomState} Defines random number generator initialisation. Passed to
get_random_state.
- pdf
Methods Summary
sample(size)Draw sample from the given PDF.
Sample along a given axis.
Methods Documentation