uniform_sample
- sherpa.sim.sample.uniform_sample(fit, num=1, factor=4, numcores=None, rng=None)[source] [edit on github]
Sample the fit statistic by taking the parameter values from an uniform distribution.
For each iteration (sample), change the thawed parameters by drawing values from a uniform distribution, and calculate the fit statistic.
Changed in version 4.16.0: The rng parameter was added.
- Parameters:
fit – The fit results.
num (int, optional) – The number of samples to use (default is
1
).factor (number, optional) – Multiplier to expand the scale parameter (default is
4
).numcores (optional) – The number of CPU cores to use. The default is to use all the cores on the machine.
rng (numpy.random.Generator, numpy.random.RandomState, or None, optional) – Determines how random numbers are created. If set to None then the routines from
numpy.random
are used, and so can be controlled by callingnumpy.random.seed
.
- Returns:
A NumPy array table with the first column representing the statistic and later columns the parameters used.
- Return type:
samples
See also
normal_sample
Sample from a normal distribution.
t_sample
Sample from the Student’s t-distribution.