Learn R Programming

DCEM (version 1.0.0)

means_uv_impr: means_uv_impr: Part of DCEM package.

Description

This function is internally called by the dcem_train to initialize the mean(s) for the Gaussian(s). It uses the proposed implementation from K-means++: The Advantages of Careful Seeding, David Arthur and Sergei Vassilvitskii. URL http://ilpubs.stanford.edu:8090/778/1/2006-13.pdf.

Usage

# Seeding the means using the K-means++ implementation.
means_uv_impr(data, num_means)

Arguments

data

(matrix): The dataset provided by the user (converted to matrix format).

num_means

(number): The number of means (meu).

Value

A vector containing the selected samples from the dataset. The initial means will be updated during the execution.

Examples

Run this code
# NOT RUN {
# Selecting the inital mean(s) using the non-uniform distance weighting.
# k-means++: The Advantages of Careful Seeding, David Arthur
# and Sergei Vassilvitskii.
# URL http://ilpubs.stanford.edu:8090/778/1/2006-13.pdf.
means_uv_impr(rnorm(100,20,10), 2)

# }

Run the code above in your browser using DataLab