Stats.GenSourceGenerative distributions.
include Stats_intf.Geninclude Stats_intf.Sampling_monad
with type 'a res =
parameters ->
(module Basic_structures.Basic_intf.Std with type t = 'a) ->
('a, float) Stats_intf.fin_mes'a t is the type of computations of type 'a
type 'a res =
parameters ->
(module Basic_structures.Basic_intf.Std with type t = 'a) ->
('a, float) Stats_intf.fin_mes'a res is the outcome of running a computation of type 'a
uniform elts samples an element of the elts array by sampling an index uniformly.
geometric p samples a nonnegative integer according to the geometric law of parameter p.
of_empirical emp samples from emp matching exactly the empirical frequencies.
Gaussian distribution via Box-Muller transform. Returns a pair of independent gaussian variates with prescribed mean and standard deviation.
Gaussian distribution (wrapper over box-muller transform).
Poisson distribution via inverse transform. Consider using other methods for large lambda.
Samples uniformly in the given range.
Categorical distribution. Total mass need not be one. Does not aggregate mass of equal elements.
Constructs a sampler from a finite measure through categorical. NB: this is mostly useful for sampling repeatedly from the distribution.