API for probabilities.monte-carlo - clojure-contrib v1.1 (stable)

by Konrad Hinsen

clojure-contrib is now deprecated

clojure-contrib is no longer being developed or maintained.

Rather than a single, monolithic, contributions library, Clojure now has a set of separate libraries for each unit of functionality. The libraries are in the Clojure GitHub organization at https://github.com/clojure. API documentation of the libraries can be found at https://clojure.github.io.

If you're looking for a specific function or namespace from the old clojure-contrib, see "Where Did Clojure.Contrib Go".


Full namespace name: clojure.contrib.probabilities.monte-carlo

Overview

Monte-Carlo method support

Monte-Carlo methods transform an input random number stream
(usually having a continuous uniform distribution in the
interval [0, 1)) into a random number stream whose distribution
satisfies certain conditions (usually the expectation value
is equal to some desired quantity). They are thus
transformations from one probability distribution to another one.

This library represents a Monte-Carlo method by a function that
takes as input the state of a random number stream with
uniform distribution (see
clojure.contrib.probabilities.random-numbers) and returns a
vector containing one sample value of the desired output
distribution and the final state of the input random number
stream. Such functions are state monad values and can be
composed using operations defined in clojure.contrib.monads.

Public Variables and Functions



discrete

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (discrete dist)
A discrete distribution, defined by a map dist mapping values
to probabilities. The sum of probabilities must be one.
Source


exponential

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (exponential lambda)
Transform a sequence of uniform random numbers in the interval [0, 1)
into a sequence of exponential random numbers with parameter lambda.
Source


lognormal

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (lognormal mu sigma)
Transform a sequence of uniform random numbesr in the interval [0, 1)
into a sequence of lognormal random numbers with mean mu and standard
deviation sigma.
Source


n-sphere

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (n-sphere n r)
Return a uniform distribution of n-dimensional vectors inside an
n-sphere of radius r.
Source


normal

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (normal mu sigma)
Transform a sequence urs of uniform random number in the interval [0, 1)
into a sequence of normal random numbers with mean mu and standard
deviation sigma.
Source


normal-box-muller

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (normal-box-muller mu sigma)
Transform a sequence of uniform random numbers in the interval [0, 1)
into a sequence of normal random numbers with mean mu and standard
deviation sigma.
Source


random-stream

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (random-stream distribution random-stream-state)
Define a random stream by a distribution and the state of a
random number stream with uniform distribution in [0, 1).
Source


reject

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (reject p dist)
Return the distribution that results from rejecting the values from
dist that do not satisfy predicate p.
Source


sample

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (sample n dist)
Return the distribution of samples of length n from the
distribution dist
Source


sample-mean

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (sample-mean n dist)
Return the distribution of the mean over n samples from the
distribution dist
Source


sample-mean-variance

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (sample-mean-variance n dist)
Return the distribution of the mean-and-variance (a vector containing
the mean and the variance) over n samples from the distribution dist
Source


sample-reduce

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (sample-reduce f n dist)
       (sample-reduce f val n dist)
Returns the distribution of the reduction of f over n samples from the
distribution dist.
Source


sample-sum

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (sample-sum n dist)
Return the distribution of the sum over n samples from the
distribution dist.
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.