Learn R Programming

mlpack (version 3.4.2)

gmm_generate: GMM Sample Generator

Description

A sample generator for pre-trained GMMs. Given a pre-trained GMM, this can sample new points randomly from that distribution.

Usage

gmm_generate(input_model, samples, seed = NA, verbose = FALSE)

Arguments

input_model

Input GMM model to generate samples from (GMM).

samples

Number of samples to generate (integer).

seed

Random seed. If 0, 'std::time(NULL)' is used. Default value "0" (integer).

verbose

Display informational messages and the full list of parameters and timers at the end of execution. Default value "FALSE" (logical).

Value

A list with several components:

output

Matrix to save output samples in (numeric matrix).

Details

This program is able to generate samples from a pre-trained GMM (use gmm_train to train a GMM). The pre-trained GMM must be specified with the "input_model" parameter. The number of samples to generate is specified by the "samples" parameter. Output samples may be saved with the "output" output parameter.

Examples

Run this code
# NOT RUN {
# The following command can be used to generate 100 samples from the
# pre-trained GMM "gmm" and store those generated samples in "samples":

# }
# NOT RUN {
output <- gmm_generate(input_model=gmm, samples=100)
samples <- output$output
# }

Run the code above in your browser using DataLab