LaplaceDistribution<T>

Models & Types · AiDotNet.Distributions

Represents a Laplace (double exponential) probability distribution.

Inheritance: DistributionBase<T> → LaplaceDistribution<T>

For Beginners

The Laplace distribution looks like two exponential distributions joined back-to-back. It has a pointy peak (unlike the Normal’s rounded peak) and fatter tails, making it more suitable when you expect more extreme values. It’s commonly used in robust statistics because it’s less sensitive to outliers.

How It Works

The Laplace distribution is characterized by a sharp peak at its location parameter and heavier tails than the Normal distribution. It’s useful for modeling data with outliers or for robust regression.

PDF: f(x) = (1 / 2b) * exp(-|x - μ| / b)

Constructors

Constructor Summary
LaplaceDistribution() Initializes a standard Laplace distribution (location=0, scale=1).
LaplaceDistribution(T location, T scale) Initializes a new Laplace distribution with specified location and scale.

Properties

Property Summary
T Location { get; } Gets the location parameter (μ).
T Mean { get; }
T Scale { get; } Gets the scale parameter (b).
T Variance { get; }
Vector<T> Parameters { get; set; }
int NumParameters { get; }
string[] ParameterNames { get; }

Methods

Method Summary
IParametricDistribution<T> Clone()
Matrix<T> FisherInformation()
T Cdf(T x)
T InverseCdf(T p)
T LogPdf(T x)
T Pdf(T x)
T Sample(Random random)
Vector<T> GradLogPdf(T x)