mpmm.cgs: Collapsed Gibbs sampler for the marginal product mixture...

Description Usage Arguments Value Author(s) References Examples

View source: R/mpmm.cgs.R

Description

Performs collapsed Gibbs sampling for the marginal-product mixture model (DuBois 2010). This function takes a dataset of observed relational events, perform inference, and return point estimates of the latent parameters using the state at the last iteration of Gibbs sampling.

The model is appropriate for analyzing event data in 1, 2, or 3-mode graphs. The main assumption is that each event belongs to a latent class. We use MCMC to explore the posterior distribution of these assignments given observed data. The resulting class assignments can be useful for exploratory data analysis and predicting missing or future data.

At the moment, the number of latent classes must be chosen a priori, though a DP version is in the works.

With the current implementation, each dimension is treated separately, e.g. for a given latent class, there will be a distribution over likely senders and a separate distribution over likely recipients, even if this involves the same set of actors.

Usage

1
mpmm.cgs(dataset, C, dims, priors, niter = 10, z.init = NULL)

Arguments

dataset

A Tx2 or Tx3 matrix of integers, each row corresponding to an event, each integer identifying the participating vertices.

C

Number of desired latent classes.

dims

Maximum value for each categorical random variable.

priors
pi

the value for the symmetric Dirichlet prior on pi (called alpha in the paper)

phi

a list where each element is the value for the symmetric Dirichlet prior for the corresponding phi vector

niter

Number of Gibbs iterations to perform.

z.init

vector of initial latent class assignments for all observations.

Value

assignments

Latent class assignments for the T observations from the last iteration of the Gibbs sampler.

params
pi

MAP estimate of the pi vector

phi

MAP estimate for the phi vectors

counts

A list where each element is a matrix counting the number of times values of the corresponding dimension were observed and assigned to a particular latent class. (These matrices are used for estimates of phi.)

dims

Maximum value for each categorical random variable.

Author(s)

Christopher DuBois (<email: duboisc@ics.uci.edu>)

References

Christopher DuBois and Padhraic Smyth. Modeling Relational Events via Latent Classes. Proceedings of the 16th ACM SIGKDD, 2010.

Examples

1
## See demo(synthetic) and demo(enron).

mpmm documentation built on May 2, 2019, 4:55 p.m.