Learn R Programming

batchmix (version 2.2.1)

samplePriorLabels: Sample prior labels

Description

Generate labels from the stick-breaking prior.

Usage

samplePriorLabels(alpha, K, N)

Value

A vector of labels.

Arguments

alpha

The concentration parameter for the stick-breaking prior.

K

The number of components to include (the upper bound on the number of unique labels generated).

N

The number of labels to generate.

Examples

Run this code
initial_labels <- samplePriorLabels(1, 50, 100)

Run the code above in your browser using DataLab