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
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:
install.packages("fmlogcondens")library(fmlogcondens)# sample data pointsX <- matrix(rnorm(200),100,2)# get the MLE for a log-concave densityparams <- 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
For plotting, we use the facilities of the package
install.packages("LogConcDEAD")library(LogConcDEAD)# convert our params to an object of type LogConcDEADr <- LogConcDEAD::getinfolcd(X, params$logMLE)# plot the estimated densitypar(mfrow = c(1, 2)) #square plotsplot(r, addp = FALSE, asp = 1)plot(r, uselog = TRUE, addp = FALSE, asp = 1)
For more details, please see the documentation and check the help
If you found an error or have a questions regarding the package, feel free to contact me: Fabian Rathke (frathke at gmail dot com).
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