package prbnmcn-dagger-stats

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val unsafe_cast : Stats.Log_space.t -> Log_space.t
include module type of struct include Stats.Pdfs end
val poisson : lambda:float -> int -> float

poisson ~lambda k is the value of the pdf of the Poisson distribution of parameter lambda at the value k.

val gaussian : mean:float -> std:float -> float -> float

The pdf of the normal, aka gaussian, distribution.

val exponential : rate:float -> float -> float

The pdf of the exponential distribution.

val geometric : p:float -> int -> float

geometric ~p k is the value of pdf of the geometric distribution evaluated at k.

val uniform : Stats.Stats_intf.range -> float -> float

uniform {min; max} x is the value of the pdf of the uniform distribution on the interval [min;max]. Note that this may evaluate to Float.infinity if min = max.

val rectangle : min:float array -> max:float array -> float array -> float

rectangle ~min ~max x computes the density of x of the uniform distribution on the axis-aligned box defined by min and max. Be careful: numerical precision issues might arise if the box is too large or has too many dimensions. Use rectangle_ln instead if you can.

  • raises Invalid_argument

    if Array.length min != Array.length max, if the length of min or max is zero or if there exists an index i such that min.(i) > max.(i).

val binomial : p:float -> n:int -> int -> float

binomial ~p ~n k gives the probability of having k successes in n independent Bernouilli trials with probability p.

  • raises Invalid_argument

    if p is not in the [0;1] interval, if n < 0, if k < 0 or if k > n.

val gamma : shape:int -> scale:float -> float -> float

gamma ~shape ~scale x is the pdf of the gamma distribution.

val tup2 : ('a -> float) -> ('b -> float) -> ('a * 'b) -> float

Pdf combinator for random variables with n independent components, n = 2.

val tup3 : ('a -> float) -> ('b -> float) -> ('c -> float) -> ('a * 'b * 'c) -> float

Pdf combinator for random variables with n independent components, n = 3.

val tup4 : ('a -> float) -> ('b -> float) -> ('c -> float) -> ('d -> float) -> ('a * 'b * 'c * 'd) -> float

Pdf combinator for random variables with n independent components, n = 4.

val tup5 : ('a -> float) -> ('b -> float) -> ('c -> float) -> ('d -> float) -> ('e -> float) -> ('a * 'b * 'c * 'd * 'e) -> float

Pdf combinator for random variables with n independent components, n = 5.

val tup6 : ('a -> float) -> ('b -> float) -> ('c -> float) -> ('d -> float) -> ('e -> float) -> ('f -> float) -> ('a * 'b * 'c * 'd * 'e * 'f) -> float

Pdf combinator for random variables with n independent components, n = 6.

val tup2_ln : ('a -> Stats.Log_space.t) -> ('b -> Stats.Log_space.t) -> ('a * 'b) -> Stats.Log_space.t

log-pdf combinator for random variables with n independent components, n = 2.

val tup3_ln : ('a -> Stats.Log_space.t) -> ('b -> Stats.Log_space.t) -> ('c -> Stats.Log_space.t) -> ('a * 'b * 'c) -> Stats.Log_space.t

log-pdf combinator for random variables with n independent components, n = 3.

val tup4_ln : ('a -> Stats.Log_space.t) -> ('b -> Stats.Log_space.t) -> ('c -> Stats.Log_space.t) -> ('d -> Stats.Log_space.t) -> ('a * 'b * 'c * 'd) -> Stats.Log_space.t

log-pdf combinator for random variables with n independent components, n = 4.

val tup5_ln : ('a -> Stats.Log_space.t) -> ('b -> Stats.Log_space.t) -> ('c -> Stats.Log_space.t) -> ('d -> Stats.Log_space.t) -> ('e -> Stats.Log_space.t) -> ('a * 'b * 'c * 'd * 'e) -> Stats.Log_space.t

log-pdf combinator for random variables with n independent components, n = 5.

val tup6_ln : ('a -> Stats.Log_space.t) -> ('b -> Stats.Log_space.t) -> ('c -> Stats.Log_space.t) -> ('d -> Stats.Log_space.t) -> ('e -> Stats.Log_space.t) -> ('f -> Stats.Log_space.t) -> ('a * 'b * 'c * 'd * 'e * 'f) -> Stats.Log_space.t

log-pdf combinator for random variables with n independent components, n = 6.

val mixture : float array -> (int -> 'a -> float) -> 'a -> float

mixture weights pdfs is the pdf of the convex combination of pdfs. weights need to be normalized, non-negative floats.

  • raises Invalid_argument

    if mixture is empty or if weights contains a negative weight.

val mixture_ln : float array -> (int -> 'a -> Stats.Log_space.t) -> 'a -> Stats.Log_space.t

mixture_ln weights log_pdfs is the log-pdf of the convex combination of log_pdfs. weights need to be normalized, non-negative floats.

  • raises Invalid_argument

    if mixture is empty or if weights contains a negative weight.

val poisson_ln : lambda:float -> k:int -> Log_space.t
val gaussian_ln : mean:float -> std:float -> float -> Log_space.t
val exponential_ln : rate:float -> float -> Log_space.t
val geometric_ln : p:float -> int -> Log_space.t
val uniform_ln : Stats.Stats_intf.range -> float -> Log_space.t
val rectangle_ln : min:float array -> max:float array -> float array -> Log_space.t
val binomial_ln : p:float -> n:int -> k:int -> Log_space.t
val gamma_ln : shape:int -> scale:float -> float -> Log_space.t
OCaml

Innovation. Community. Security.