Learn R Programming

fdm2id (version 0.9.5)

predict.meanshift: Predict function for MeanShift

Description

Return the closest MeanShift cluster for a new dataset.

Usage

# S3 method for meanshift
predict(object, newdata, ...)

Arguments

object

The classification model (created by MEANSHIFT).

newdata

A new dataset (a data.frame), with same variables as the learning dataset.

...

Other parameters.

See Also

MEANSHIFT

Examples

Run this code
# NOT RUN {
require (datasets)
data (iris)
d = splitdata (iris, 5)
model = MEANSHIFT (d$train.x, bandwidth = .75)
predict (model, d$test.x)
# }

Run the code above in your browser using DataLab