# Distribution Functor¶

This document is auto-generated for Owl’s APIs. #200 entries have been extracted.

Github: {Signature} {Implementation}

## Uniform distribtion¶

type t = { a : A.arr; b : A.arr; }


Type definition of a specific distribution

val make : a:A.arr -> b:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Gaussian distribtion¶

type t = { mu : A.arr; sigma : A.arr; }


Type definition of a specific distribution

val make : mu:A.arr -> sigma:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Exponential distribtion¶

type t = { lambda : A.arr; }


Type definition of a specific distribution

val make : lambda:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Gamma distribtion¶

type t = { shape : A.arr; scale : A.arr; }


Type definition of a specific distribution

val make : shape:A.arr -> scale:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Beta distribtion¶

type t = { a : A.arr; b : A.arr; }


Type definition of a specific distribution

val make : a:A.arr -> b:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Chi2 distribtion¶

type t = { df : A.arr; }


Type definition of a specific distribution

val make : df:A.arr -> _sigma:'a -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## F distribtion¶

type t = { dfnum : A.arr; dfden : A.arr; }


Type definition of a specific distribution

val make : dfnum:A.arr -> dfden:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Cauchy distribtion¶

type t = { loc : A.arr; scale : A.arr; }


Type definition of a specific distribution

val make : loc:A.arr -> scale:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Lomax distribtion¶

type t = { shape : A.arr; scale : A.arr; }


Type definition of a specific distribution

val make : shape:A.arr -> scale:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Weibull distribtion¶

type t = { shape : A.arr; scale : A.arr; }


Type definition of a specific distribution

val make : shape:A.arr -> scale:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Laplace distribtion¶

type t = { loc : A.arr; scale : A.arr; }


Type definition of a specific distribution

val make : loc:A.arr -> scale:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Gumbel1 distribtion¶

type t = { a : A.arr; b : A.arr; }


Type definition of a specific distribution

val make : a:A.arr -> b:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Gumbel2 distribtion¶

type t = { a : A.arr; b : A.arr; }


Type definition of a specific distribution

val make : a:A.arr -> b:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Logistic distribtion¶

type t = { loc : A.arr; scale : A.arr; }


Type definition of a specific distribution

val make : loc:A.arr -> scale:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Lognormal distribtion¶

type t = { mu : A.arr; sigma : A.arr; }


Type definition of a specific distribution

val make : mu:A.arr -> sigma:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Rayleigh distribtion¶

type t = { sigma : A.arr; }


Type definition of a specific distribution

val make : sigma:A.arr -> t


Make a distribution of the given parameters.

val sample : t -> int -> A.arr


Sample a distribution of the given parameters.

val pdf : t -> A.arr -> A.arr


Probability density/mass function of the distribution.

val logpdf : t -> A.arr -> A.arr


Logarithm of the probability density/mass function of the distribution.

val cdf : t -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : t -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.

val ppf : t -> A.arr -> A.arr


Percentile function of the distribution.

val sf : t -> A.arr -> A.arr


Survival function of the distribution.

val logsf : t -> A.arr -> A.arr


Logarithm of the survival function of the distribution.

val isf : t -> A.arr -> A.arr


Inverse survival function of the distribution.

## Type definition¶

type dist =
| Uniform of Uniform.t
| Gaussian of Gaussian.t
| Exponential of Exponential.t
| Gamma of Gamma.t
| Beta of Beta.t
| Chi2 of Chi2.t
| F of F.t
| Cauchy of Cauchy.t
| Lomax of Lomax.t
| Weibull of Weibull.t
| Laplace of Laplace.t
| Gumbel1 of Gumbel1.t
| Gumbel2 of Gumbel2.t
| Logistic of Logistic.t
| Lognormal of Lognormal.t
| Rayleigh of Rayleigh.t


Type definition of various distribtions

## Core functions¶

val sample : dist -> int -> A.arr


Sample a given distribution of the given parameters.

val prob : dist -> A.arr -> A.arr


Probability density/mass function of a given distribtion.

source code

val log_prob : dist -> A.arr -> A.arr


logarithmic probability density/mass function of a given distribtion.

source code

val cdf : dist -> A.arr -> A.arr


Cumulative density/mass function of the distribution.

val logcdf : dist -> A.arr -> A.arr


Logarithm of the cumulative density/mass function of the distribution.