Learn R Programming

MoMPCA (version 1.0.1)

simulate_BBC: simulate_BBC

Description

This function simulate from the MMPCA model with an additional noise parameter epsilon. The number of cluster is Q=6 for K=4 topics. The parameter beta is taken to be the row normalized document-term matrix of 4 BBC messages contained in BBCmsg.

Usage

simulate_BBC(N, L, epsilon = 0, lambda = 1, theta_true = NULL)

Arguments

N

number of observations.

L

vector of length N containing the total count per observations. Duplicated if integer.

epsilon

The noise level in the latent space. Quantify how far the distribution is from theta_true

lambda

A parameter quantifying the class proportion. lambda=1 means balanced cluster sizes, lower means that the last clusters are bigger, with an geometric decay in cluster size for the first ones.

theta_true

The true parameter theta for the simulation. If NULL (default) then it is initialized to the default value of the experimental section of the paper.

Value

A list with names

  • dtm.full: A DocumentTermMatrix object containing the simulated document-term matrix

  • Ytruth: the simulated partition

  • theta_true The parameter of the simulation

Examples

Run this code
# NOT RUN {
simu <- simulate_BBC(N = 100, L = 200, epsilon = 0, lambda = 1)
dtm <- simu$dtm.full
Ytruth <- simu$Ytruth

# }

Run the code above in your browser using DataLab