predict,pkbc-method {QuadratiK}R Documentation

Cluster spherical observations by mixture of Poisson kernel-based densities

Description

Cluster spherical observations based on mixture of Poisson kernel-based densities estimated by pkbc

Usage

## S4 method for signature 'pkbc'
predict(object, k, newdata = NULL)

Arguments

object

Object of class pkbc

k

Number of clusters to be used.

newdata

a data.frame or a matrix of the data. If missing the clustering data obtained from the pkbc object are classified.

Value

Returns a list with the following components

See Also

pkbc()

Examples

# generate data
dat <- rbind(matrix(rnorm(100),ncol=2),matrix(rnorm(100,5),ncol=2))
res <- pkbc(dat,2)

# extract membership of dat
predict(res,k=2)
# predict membership of new data
newdat <- rbind(matrix(rnorm(10),ncol=2),matrix(rnorm(10,5),ncol=2))
predict(res, k=2, newdat)
 

[Package QuadratiK version 1.1.1 Index]