estimate_bandwidth(data,method="silverman")
"silverman"
, "plug-in"
, or "cross-validation"
- see 'details' section."silverman"
) estimator is defined as 1.06 * sd(X) * m^(-1/5) where m is the number of observations and X is the data vector in each dimension. Minimizes mean integrated square error along each axis independently. This is the default option due ONLY to computational simplicity.The plug-in ("plug-in"
) estimator is defined using a diagonal plug-in estimator with a 2-stage pilot estimation and a pre-scaling transformation (in ks::Hpi.diag
). The resulting diagonal variances are then transformed to standard deviations and multiplied by two to be consistent for the box kernels used here. Available only in n<7 dimensions.="" minimizes="" sum="" of="" asymptotic="" mean="" squared="" error.<="" p="">
The cross-validation ("cross-validation"
) estimator is defined using a diagonal smoothed cross validation estimator with a 2-stage pilot estimation and a pre-scaling transformation (in ks::Hscv.diag
). The resulting diagonal variances are then transformed to standard deviations and multiplied by two to be consistent for the box kernels used here. Available only in n<7 dimensions.="" minimizes="" sum="" of="" asymptotic="" mean="" squared="" error.<="" p="">
Note that all estimators are optimal only for normal kernels, whereas the hypervolume algorithms use box kernels - as the number of data points increases, this difference will become increasingly less important.
Computational run-times for the plug-in and cross-validation estimators may become infeasibly large in n>=4 dimensions.
7>7>data(iris)
print(estimate_bandwidth(iris[,1:2],method="silverman"))
print(estimate_bandwidth(iris[,1:2],method="plug-in"))
print(estimate_bandwidth(iris[,1:2],method="cross-validation"))
Run the code above in your browser using DataLab