gmm_generate: GMM Sample Generator

View source: R/gmm_generate.R

gmm_generateR Documentation

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).

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.

Value

A list with several components:

output

Matrix to save output samples in (numeric matrix).

Author(s)

mlpack developers

Examples

# 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

## End(Not run)

mlpack documentation built on Sept. 27, 2023, 1:07 a.m.

Related to gmm_generate in mlpack...