Title: | 28 Benchmark Densities from Berlinet/Devroye (1994) |
---|---|
Description: | Full implementation of the 28 distributions introduced as benchmarks for nonparametric density estimation by Berlinet and Devroye (1994) <https://hal.science/hal-03659919>. Includes densities, cdfs, quantile functions and generators for samples as well as additional information on features of the densities. Also contains the 4 histogram densities used in Rozenholc/Mildenberger/Gather (2010) <doi:10.1016/j.csda.2010.04.021>. |
Authors: | Thoralf Mildenberger [aut, cre]
|
Maintainer: | Thoralf Mildenberger <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.8 |
Built: | 2025-02-17 04:14:19 UTC |
Source: | https://github.com/thmild/benchden |
Names and points of nonsmoothness for the 28 distributions from Berlinet/Devroye (1994).
bberdev(dnum = 1) nberdev(dnum = 1)
bberdev(dnum = 1) nberdev(dnum = 1)
dnum |
number of distribution as in Berlinet/Devroye (1994), Section 3.2. |
These functions implement the 28 distributions from Berlinet and Devroye (1994), Section 3.2, which are:
dnum == 1
"uniform" on [0,1] as in stats-package
dnum == 2
"exponential" as in stats-package
dnum == 3
"Maxwell"
dnum == 4
"double exponential"
dnum == 5
"logistic" as in stats-package
dnum == 6
"Cauchy" as in stats-package
dnum == 7
"extreme value"
dnum == 8
"infinite peak"
dnum == 9
"Pareto"
dnum == 10
"symmetric Pareto"
dnum == 11
"normal" as in stats-package
dnum == 12
"lognormal"
dnum == 13
"uniform scale mixture"
dnum == 14
"Matterhorn"
dnum == 15
"logarithmic peak"
dnum == 16
"isosceles triangle"
dnum == 17
"beta 2,2" as in stats-package
dnum == 18
"chi-square 1" as in stats-package
dnum == 19
"normal cubed"
dnum == 20
"inverse exponential"
dnum == 21
"Marronite"
dnum == 22
"skewed bimodal"
dnum == 23
"claw"
dnum == 24
"smooth comb"
dnum == 25
"caliper"
dnum == 26
"trimodal uniform"
dnum == 27
"sawtooth"
dnum == 28
"bilogarithmic peak"
nberdev |
gives the name of the distribution (the same as |
bberdev |
Since evaluation of loss functions
in nonparametric density estimation often requires numerical
integration, |
Thoralf Mildenberger, Henrike Weinert and Sebastian Tiemeyer
A. Berlinet and L. Devroye, "A comparison of kernel density estimates", Publications de l'Institut de Statistique de l'Universite de Paris, vol. 38(3), pp. 3-59, 1994. https://hal.science/hal-03659919
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
# name of "Claw"-distribution nberdev(dnum=23)
# name of "Claw"-distribution nberdev(dnum=23)
Name, position of modes, support and points of nonsmoothness for the 28 distributions from Berlinet/Devroye (1994).
berdev(dnum = 1)
berdev(dnum = 1)
dnum |
number of distribution as in Berlinet/Devroye (1994), Section 3.2. |
These functions implement the 28 distributions from Berlinet and Devroye (1994), Section 3.2, which are:
dnum == 1
"uniform" on [0,1] as in stats-package
dnum == 2
"exponential" as in stats-package
dnum == 3
"Maxwell"
dnum == 4
"double exponential"
dnum == 5
"logistic" as in stats-package
dnum == 6
"Cauchy" as in stats-package
dnum == 7
"extreme value"
dnum == 8
"infinite peak"
dnum == 9
"Pareto"
dnum == 10
"symmetric Pareto"
dnum == 11
"normal" as in stats-package
dnum == 12
"lognormal"
dnum == 13
"uniform scale mixture"
dnum == 14
"Matterhorn"
dnum == 15
"logarithmic peak"
dnum == 16
"isosceles triangle"
dnum == 17
"beta 2,2" as in stats-package
dnum == 18
"chi-square 1" as in stats-package
dnum == 19
"normal cubed"
dnum == 20
"inverse exponential"
dnum == 21
"Marronite"
dnum == 22
"skewed bimodal"
dnum == 23
"claw"
dnum == 24
"smooth comb"
dnum == 25
"caliper"
dnum == 26
"trimodal uniform"
dnum == 27
"sawtooth"
dnum == 28
"bilogarithmic peak"
berdev
returns a list with components
name |
gives the name of the distribution, |
peaks |
gives a vector of the positions of peaks or modes of the density, and |
support |
gives a matrix as follows: in each row an interval is defined (with the first column giving the left and the second column the right end of the interval). Together the intervals give the support of the distribution (for most distributions only one interval). |
breaks |
Since evaluation of loss functions
in nonparametric density estimation often requires numerical
integration, |
Thoralf Mildenberger, Henrike Weinert and Sebastian Tiemeyer
A. Berlinet and L. Devroye, "A comparison of kernel density estimates", Publications de l'Institut de Statistique de l'Universite de Paris, vol. 38(3), pp. 3-59, 1994. https://hal.science/hal-03659919
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
# position of peaks of "Claw"-distribution berdev(dnum=23)$peaks # support of the "Trimodal uniform" berdev(dnum=26)$support
# position of peaks of "Claw"-distribution berdev(dnum=23)$peaks # support of the "Trimodal uniform" berdev(dnum=26)$support
Names and breakpoints for the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010).
bhisto(dnum = 1) nhisto(dnum = 1)
bhisto(dnum = 1) nhisto(dnum = 1)
dnum |
number of distribution. |
These functions implement the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010). Defined as the following mixtures of uniform distributions:
dnum == 1
5 bin regular histogram:
dnum == 2
5 bin irregular histogram:
dnum == 3
10 bin regular histogram:
dnum == 4
10 bin irregular histogram:
where denotes the uniform distribution on
.
nhisto |
gives the name of the distribution (the same as |
bhisto |
gives the vector of break points (the same as |
Thoralf Mildenberger
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
Y. Rozenholc, T. Mildenberger and U. Gather (2010), "Combining Regular and Irregular Histograms by Penalized Likelihood", Computational Statistics and Data Analysis, 54, 3313-3323. doi:10.1016/j.csda.2010.04.021 Earlier version including explicit definition of the densities: doi:10.17877/DE290R-15901
# name string of 5 bin regular histogram nhisto(dnum=1)
# name string of 5 bin regular histogram nhisto(dnum=1)
Density, distribution function, quantile function and random variate generation for the 28 distributions from Berlinet/Devroye (1994).
dberdev(x,dnum = 1) pberdev(q,dnum = 1) qberdev(p,dnum = 1) rberdev(n,dnum = 1)
dberdev(x,dnum = 1) pberdev(q,dnum = 1) qberdev(p,dnum = 1) rberdev(n,dnum = 1)
dnum |
number of distribution as in Berlinet/Devroye (1994), Section 3.2. |
x , q
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
These functions implement the 28 distributions from Berlinet and Devroye (1994), Section 3.2, which are:
dnum == 1
"uniform" on [0,1] as in stats-package
dnum == 2
"exponential" as in stats-package
dnum == 3
"Maxwell"
dnum == 4
"double exponential"
dnum == 5
"logistic" as in stats-package
dnum == 6
"Cauchy" as in stats-package
dnum == 7
"extreme value"
dnum == 8
"infinite peak"
dnum == 9
"Pareto"
dnum == 10
"symmetric Pareto"
dnum == 11
"normal" as in stats-package
dnum == 12
"lognormal"
dnum == 13
"uniform scale mixture"
dnum == 14
"Matterhorn"
dnum == 15
"logarithmic peak"
dnum == 16
"isosceles triangle"
dnum == 17
"beta 2,2" as in stats-package
dnum == 18
"chi-square 1" as in stats-package
dnum == 19
"normal cubed"
dnum == 20
"inverse exponential"
dnum == 21
"Marronite"
dnum == 22
"skewed bimodal"
dnum == 23
"claw"
dnum == 24
"smooth comb"
dnum == 25
"caliper"
dnum == 26
"trimodal uniform"
dnum == 27
"sawtooth"
dnum == 28
"bilogarithmic peak"
dberdev |
gives the density, |
pberdev |
gives the distribution function, |
qberdev |
gives the quantile function, and |
rberdev |
generates random deviates. |
The authors thank Luc Devroye for providing his original implementation for testing purposes.
Thoralf Mildenberger, Henrike Weinert and Sebastian Tiemeyer
A. Berlinet and L. Devroye, "A comparison of kernel density estimates," Publications de l'Institut de Statistique de l'Universite de Paris, vol. 38(3), pp. 3-59, 1994. https://hal.science/hal-03659919
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
# histogram and true density of "Claw"-distribution hist(rberdev(1000,dnum=23),breaks=100, main = " ",freq=FALSE) lines(seq(-3,3,0.01),dberdev(seq(-3,3,0.01),dnum=23),col="blue",lwd=2) title(paste(nberdev(dnum=23))) # plot cdf of simulated data and the df of "Matterhorn"-distribution plot.stepfun(rberdev(100,dnum=14),do.points=TRUE,main="") lines(seq(-1,1,0.001),pberdev(seq(-1,1,0.001),dnum=14),col="blue") title(paste(nberdev(dnum=14))) # plot quantiles of "smooth comb"-distribution plot(qberdev(seq(0,1,0.01),dnum=24),t="l") title(paste(nberdev(dnum=24)))
# histogram and true density of "Claw"-distribution hist(rberdev(1000,dnum=23),breaks=100, main = " ",freq=FALSE) lines(seq(-3,3,0.01),dberdev(seq(-3,3,0.01),dnum=23),col="blue",lwd=2) title(paste(nberdev(dnum=23))) # plot cdf of simulated data and the df of "Matterhorn"-distribution plot.stepfun(rberdev(100,dnum=14),do.points=TRUE,main="") lines(seq(-1,1,0.001),pberdev(seq(-1,1,0.001),dnum=14),col="blue") title(paste(nberdev(dnum=14))) # plot quantiles of "smooth comb"-distribution plot(qberdev(seq(0,1,0.01),dnum=24),t="l") title(paste(nberdev(dnum=24)))
Density, distribution function, quantile function and random variate generation for the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010).
dhisto(x,dnum = 1) phisto(q,dnum = 1) qhisto(p,dnum = 1) rhisto(n,dnum = 1)
dhisto(x,dnum = 1) phisto(q,dnum = 1) qhisto(p,dnum = 1) rhisto(n,dnum = 1)
dnum |
number of distribution as in Rozenholc/Mildenberger/Gather (2010) |
x , q
|
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
These functions implement the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010). Defined as the following mixtures of uniform distributions:
dnum == 1
5 bin regular histogram:
dnum == 2
5 bin irregular histogram:
dnum == 3
10 bin regular histogram:
dnum == 4
10 bin irregular histogram:
where denotes the uniform distribution on
.
dhisto |
gives the density, |
phisto |
gives the distribution function, |
qhisto |
gives the quantile function, and |
rhisto |
generates random deviates. |
Thoralf Mildenberger
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
Y. Rozenholc, T. Mildenberger and U. Gather (2010), "Combining Regular and Irregular Histograms by Penalized Likelihood", Computational Statistics and Data Analysis, 54, 3313-3323. doi:10.1016/j.csda.2010.04.021 Earlier version including explicit definition of the densities: doi:10.17877/DE290R-15901
# histogram and true density of "5 bin irregular"-distribution hist(rhisto(2000,dnum=2),breaks=250, main = " ",freq=FALSE) lines(seq(0,1,0.01),dhisto(seq(0,1,0.01),dnum=2),col="blue",lwd=1) title(paste("sample from",nhisto(dnum=2),"density"))
# histogram and true density of "5 bin irregular"-distribution hist(rhisto(2000,dnum=2),breaks=250, main = " ",freq=FALSE) lines(seq(0,1,0.01),dhisto(seq(0,1,0.01),dnum=2),col="blue",lwd=1) title(paste("sample from",nhisto(dnum=2),"density"))
Name, position of modes, support and break points for the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010).
histo(dnum = 1)
histo(dnum = 1)
dnum |
number of distribution. |
These functions implement the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010). Defined as the following mixtures of uniform distributions:
dnum == 1
5 bin regular histogram:
dnum == 2
5 bin irregular histogram:
dnum == 3
10 bin regular histogram:
dnum == 4
10 bin irregular histogram:
where denotes the uniform distribution on
.
histo
returns a list with the following components:
name |
gives the name of the distribution. |
peaks |
gives a vector of the positions of peaks of the density, defined here as mid points of maximal intervals. |
support |
gives a matrix with one row with the endpoints of the support,
which is |
breaks |
gives the vector of break points. |
Thoralf Mildenberger
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
Y. Rozenholc, T. Mildenberger and U. Gather (2010), "Combining Regular and Irregular Histograms by Penalized Likelihood", Computational Statistics and Data Analysis, 54, 3313-3323. doi:10.1016/j.csda.2010.04.021 Earlier version including explicit definition of the densities: doi:10.17877/DE290R-15901
# position of peaks of the 5 bin irregular histogram density histo(dnum=2)$peaks # support of the 10 bin regular histogram density histo(dnum=3)$support
# position of peaks of the 5 bin irregular histogram density histo(dnum=2)$peaks # support of the 10 bin regular histogram density histo(dnum=3)$support