predict.orclus: Arbitrarily ORiented projected CLUSter generation

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/orclus.R

Description

Assigns clusters and distances to cluster centers in the corresponding subspaces for new data according to a subspace clustering model of class orclus.

Usage

1
2
## S3 method for class 'orclus'
predict(object, newdata, ...)

Arguments

object

Model resulting from a call of orclus.

newdata

A matrix or data frame to be clustered by the given model.

...

Currently not used.

Value

distances

A matrix where coloumns are the distances to all cluster centers in the corresponding subspaces for the new data.

cluster

The resulting cluster labels for the new data.

Author(s)

Gero Szepannek

References

Aggarwal, C. and Yu, P. (2000): Finding generalized projected clusters in high dimensional spaces, Proceedings of ACM SIGMOD International Conference on Management of Data, pp. 70-81.

See Also

orclus

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# generate simple artificial example of two clusters
clus1.v1 <- runif(100)
clus2.v1 <- runif(100) 
xample <- rbind(cbind(clus1.v1, 0.5 - clus1.v1), cbind(clus2.v1, -0.5 + clus2.v1))

orclus.res <- orclus(x = xample, k = 2, l = 1, k0 = 8, a = 0.5)

# generate new data and predict it using the 
newclus1.v1 <- runif(100)
newclus2.v1 <- runif(100) 
true.clusterids  <- rep(1:2, each = 100)
xample2 <- rbind(cbind(newclus1.v1, 0.5 - newclus1.v1), 
                 cbind(newclus2.v1, -0.5 + newclus2.v1))

orclus.prediction <- predict(orclus.res, xample2)
table(orclus.prediction$cluster, true.clusterids)

orclus documentation built on May 2, 2019, 10:23 a.m.