coverage.raw(X, vec, tau, weights=1, plot.type="p", print=FALSE,
label=NULL,...)coverage(X, vec, taumin=0.02, taumax, gridsize=25, weights=1,
plot.type="o", print=FALSE,...)
lpc.coverage(object, taumin=0.02, taumax, gridsize=25, quick=TRUE,
plot.type="o", print=FALSE, ...)
lpc.self.coverage(X, taumin=0.02, taumax=0.5, gridsize=25, x0, mult=1,
way = "two", scaled=TRUE, weights=1, pen=2, depth=1,
control=lpc.control(boundary=0, cross=FALSE), quick=TRUE,
plot.type="o", print=FALSE, ... )
select.self.coverage(self, smin, plot.type="o", plot.segments=NULL)
lpc
or lpc.spline
.lpc.coverage
does not have a
weights
argument, aself
, or a matrix with two colums
providing a self-coverage curve.list(lty=c(1,2,3),
lwd=c(2,1,1),lcol=c(3,3,3))
which specifies how (and how many)
bandwidth candidates, in order of decreasing negative second derivative of
self-coverage, are to be highlighted.gridsize
is large.lpc
and lpc.control
.plot.type=0
). For function lpc.self.coverage
, the item $select
recommends suitable
bandwidths for the use in lpc
. These correspond to
points of strong negative curvature (implemented via second
differences) of the self-coverage curve.
coverage.raw
computes the coverage, i.e. the
proportion of data points lying inside a circle or band with radius
$\tau$, for a fixed value tau
. The whole coverage curve
$C(\tau)$ is constructed through function coverage
.
Functions coverage.raw
and coverage
can be used for any
object fitted by an unsupervised learning technique (for instance, HS principal curves, or even clustering
algorithms), while the functions prefixing with lpc.
can only be
used for local principal curves. The function lpc.coverage
is a wrapper around
coverage
which takes directly a fitted lpc
object, rather
than a data matrix.Function select.self.coverage
is called by
lpc.self.coverage
. It extracts suitable bandwidths from the
self-coverage curve, and produces a plot. The function can also be called
directly by the user (for instance, if the graphical output is to be reproduced, or if
the minimum coverage smin
is to be modified). The component
$select
contains the selected candidate bandwidths, in the order
of strength of evidence provided by the self-coverage criterion (the
best bandwidth comes first, etc.). A plot is produced as a by-product,
which symbolizes the best bandwidth by a thick solid line, the
second-best by a dashed line, and the third-best by a dotted line. See
Einbeck (2011) for details.
Note that the original publication by Einbeck, Tutz, and Evers (2005) uses `quick' coverage curves.
Einbeck, J. (2011). Bandwidth selection for mean-shift based unsupervised learning techniques: a unified approach via self-coverage. Journal of Pattern Recognition Research, to appear.
lpc
data(gvessel)
gvessel.self <-lpc.self.coverage(gvessel[,c(2,4,5)], x0=c(35, 1870,
6.3), print=FALSE, plot.type=0)
h <- select.self.coverage(gvessel.self)$select
gvessel.lpc <- lpc(gvessel[,c(2,4,5)], h=h[1], x0=c(35, 1870, 6.3))
lpc.coverage(gvessel.lpc, gridsize=10, print=FALSE)
data(calspeedflow)
fitms <- ms(calspeedflow[,3:4], h=0.1)
coverage(fitms$data, fitms$cluster.center)
Run the code above in your browser using DataLab