kmedians: kmedians

Description Usage Arguments Value

Description

Groups the points in your dataset ,X, into the desired number of clusters, based on the median distance between the points. This function uses random intilization to assign the first medians and then will update the medians and the group assignments until the assignment does not change.

Usage

1
kmedians(X, num_clusters, n_it = 100)

Arguments

X

a matrix, the dataset being clustered

num_clusters

integer, the desired number of clusters

n_it

integer, number of iterations

Value

list, contains both medians and labes medians: matrix The coordinates of the medians for each cluster

labels: list List that has the assignment of the cluster for each point in the dataset


UBC-MDS/KMediansR documentation built on May 7, 2019, 7:14 p.m.