<< cov Miscellaneous histocvsearch >>

Stixbox >> Stixbox > Miscellaneous > histocvimse

histocvimse

Cross-validation IMSE of an histogram.

Calling Sequence

jhat=histocvimse(x,n)

Parameters

x :

a m-by-1 or 1-by-m matrix of doubles, the data

n :

a nbins-by-1 or 1-by-nbins matrix of doubles, the number of bins in the histogram

jhat :

a nbins-by-1 or 1-by-nbins matrix of doubles, the leave-one-out cross-validation IIMSE

Description

Compute the leave-one-out cross-validation integrated mean square error (IMSE) for the histogram of x with n bins. When this IMSE is minimum, then the integrated mean square error is minimal.

The IMSE has a part which depends on the histogram and a part which only depends on the density of the distribution we estimate. This last part does not depend on the histogram bin width h. The function J(h) below is only the part of the IMSE which depends on the histogram bin width. This is why the proper name should be partial IMSE.

Consider the bin width h=1/m, where m is the number of observations. Consider the histogram with n bins. Let Y(i) the number of observations in the i-th bin. We compute the IMSE :

where

for i=1,...,n.

Examples

m=5; // Number of observations
x=distfun_normrnd(0,1,m,1);
jhat=histocvimse(x,10)

// Prints the Cross-Validation IMSE versus the number of bins
m=100; // Number of observations
x=distfun_normrnd(0,1,m,1);
xlabel("Number of bins");
ylabel("Cross-Validation IMSE");
jhat=histocvimse(x,1:m);
plot((1:m)',jhat,"bo")

Bibliography

All of non parametric statistics, L. Wasserman, Springer, 2006, chapter 6 "Density estimation", p 129, Theorem 6.15

Authors


Report an issue
<< cov Miscellaneous histocvsearch >>