Description Usage Arguments Details Value Author(s) Examples

This function finds cluster label of a set of samples according to a given set of centers specified in the model object.

1 2 |

`object` |
an object returned by dkmeans function |

`newdata` |
a darray (dense or sparse) or a matrix which contains the samples. |

`trace` |
when this argument is true, intermediate steps of the progress are displayed. |

`...` |
additional arguments to be passed (None are supported). |

This function applies the centers found by dkmeans on a new set of samples in order to label them.

This function returns a darray or a matrix based on the type of newdata which contains the corresponding label of each sample.

Vishrut Gupta, Arash Fard

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
iris2 <- iris
iris2$Species <- NULL
library(kmeans.ddR)
X <- as.darray(data.matrix(iris2))
mykm <- dkmeans(X,centers=3)
newdata <- matrix(c(5,4,3,5,7,1,0,8),2,4)
labels <- predict(mykm,newdata)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.