Code to do 2d gaussian kernel density estimation with 1D product kernels It also does cross validation.