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 |
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 |
Value
Returns a list with the following components
Memb: vector of predicted memberships of
newdata
Probs: matrix where entry (i,j) denotes the probability that observation i belongs to the k-th cluster.
See Also
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]