Skip to contents

Assign new data to e-means centers

Usage

# S3 method for class 'emeans'
predict(object, newdata, distance = FALSE, n_threads = NULL, ...)

Arguments

object

An emeans fit.

newdata

Numeric matrix or data frame with the same columns.

distance

If TRUE, return a data frame with cluster and distance (squared Euclidean; cosine similarity when spherical).

n_threads

Threads; see emeans().

...

Unused.

Value

Integer cluster labels, or a data frame when distance = TRUE.