Learn R Programming

clugenr (version 1.0.4)

clucenters: Determine cluster centers using the uniform distribution

Description

Determine cluster centers using the uniform distribution, taking into account the number of clusters (num_clusters) and the average cluster separation (clu_sep).

More specifically, let c=num_clusters, s=s=clu_sep, o=o=clu_offset, n=length(clu_sep) (i.e., number of dimensions). Cluster centers are obtained according to the following equation:

C=cUdiag(s) + 1\,o^TC=cU.diag(s) + 1o'

where CC is the c nc x n matrix of cluster centers, UU is an c nc x n matrix of random values drawn from the uniform distribution between -0.5 and 0.5, and 11 is an c 1c x 1 vector with all entries equal to 1.

Usage

clucenters(num_clusters, clu_sep, clu_offset)

Value

A c nc x n matrix containing the cluster centers.

Arguments

num_clusters

Number of clusters.

clu_sep

Average cluster separation (n 1n x 1 vector).

clu_offset

Cluster offsets (n 1n x 1 vector).

Examples

Run this code
set.seed(321)
clucenters(3, c(30, 10), c(-50,50))

Run the code above in your browser using DataLab