Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vcgKmeans

fast Kmean clustering for 1D, 2D and 3D data


Description

fast Kmean clustering for 1D, 2D and 3D data

Usage

vcgKmeans(x, k = 10, iter.max = 10, getClosest = FALSE, threads = 0)

Arguments

x

matrix containing coordinates or mesh3d

k

number of clusters

iter.max

maximum number of iterations

getClosest

logical: if TRUE the indices of the points closest to the k-centers are sought.

threads

integer: number of threads to use

Value

returns a list containing

centers

cluster center

class

vector with cluster association for each coordinate

If getClosest=TRUE

selected

vector with indices of points closest to the centers

See Also

Examples

require(Rvcg);require(rgl)
data(humface)
set.seed(42)
clust <- vcgKmeans(humface,k=1000,threads=1)

Rvcg

Manipulations of Triangular Meshes Based on the 'VCGLIB' API

v0.19.2
GPL (>= 2) | file LICENSE
Authors
Stefan Schlager [aut, cre, cph], Girinon Francois [ctb]
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.