NNclean(data, k, distances = NULL, edge.correct = FALSE, wrap = 0.1,
convergence = 0.001, plot=FALSE, quiet=TRUE)## S3 method for class 'nnclean':
print(x, ...)
dist. If
specified, it is used instead of computing distances from the data.TRUE and the data is
two-dimensional, neighbors for points at the edges of the parent
region of the noise Poisson process are determined after wrapping
the region onto a toroid.edge.correct=TRUE, points in a
strip of size wrap*range along the edge for each variable
are candidates for
being neighbors of points from the opposite.TRUE, a histogram of the distance to
kth nearest neighbor and fit is plotted.FALSE, the likelihood is printed
during the iterations.nnclean.NNclean returns a list of class nnclean with componentslibrary(mclust)
data(chevron)
nnc <- NNclean(chevron[,2:3],15,plot=TRUE)
plot(chevron[,2:3],col=1+nnc$z)Run the code above in your browser using DataLab