Fast Multivariate Log-Concave Density Estimation

A fast solver for the maximum likelihood estimator (MLE) of a multivariate log-concave probability function. Given a sample X, it estimates a non-parametric density function whose logarithm is a concave function. Many well-known parametric densities belong to that class, among them the normal density, the uniform density, the exponential distribution and many more. This package provides functions for the estimation of a log-concave density and a mixture of log-concave densities in multiple dimensions. While being similar to the package LogConcDEAD, fmlogcondens provides much fast run times for large samples (>= 250 points). As a reference see Fabian Rathke, Christoph Schnörr (2015), .

fmlogcondens is a package written in R and C, which provides a solver for the maximum likelihood estimation of a multivariate log-concave density. Log-concave densities are an important class of density functions, which encompass several well-known parametric densities such as the normal, uniform, gamma(r, lambda) with r >= 1, Beta(a,b) with a,b >= 1 and many more. They are density functions, whose logarithm is a concave function.

Estimating a log-concave density for a sample X is straight-forward using our package:

# sample data points
X <- matrix(rnorm(200),100,2)
# get the MLE for a log-concave density
params <- fmlcd(X)

For the ML estimate, the optimal solution in log-space is a piecewise linear concave function. Our estimator thus returns a set of hyperplane parameters stored in params$a and params$b.

For plotting, we use the facilities of the package LogConcDEAD

# convert our params to an object of type LogConcDEAD
r <- LogConcDEAD::getinfolcd(X, params$logMLE)
# plot the estimated density
par(mfrow = c(1, 2)) #square plots
plot(r, addp = FALSE, asp = 1)
plot(r, uselog = TRUE, addp = FALSE, asp = 1)

For more details, please see the documentation and check the help ?fmlcd.

If you found an error or have a questions regarding the package, feel free to contact me: Fabian Rathke (frathke at gmail dot com).



1.0.0 (initial version)

Provide the functions necessary to estimate a multivariate log-concave density function as well as a multivariate log-concave mixture distribution.


  • Fixed a memory leak in C

  • Some Mac OS X specific fixes for the C code


  • Solaris-specific fix regarding aligned memory allocation

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.2 by Fabian Rathke, a year ago

Browse source code at

Authors: Fabian Rathke [aut, cre] , Christoph Schnörr [aut] , Giovanni Garberoglio [cph]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports geometry, MASS, mclust, mvtnorm

Suggests LogConcDEAD, knitr, rmarkdown

See at CRAN