Learn R Programming

DCEM (version 1.0.0)

means_uv: means_uv: Part of DCEM package.

Description

This function is internally called by the dcem_train to initialize the mean(s) for the Gaussian(s). It randomly selects the mean(s) from the range min(data):max(data). This is the default method for initializing the means(s).

Usage

# Randomly seeding the mean(s).
means_uv(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 {
# Randomly selecting the samples from a normal distribution as inital mean(s).
means_uv(rnorm(100,20,10), 2)

# }

Run the code above in your browser using DataLab