Description Usage Arguments Value Author(s) References See Also Examples
This function is used to compute the probability of given events under the MPMM with the provided parameters. These parameters could be estimated from fitting the model with mpmm.cgs, for example.
1 | mpmm.predict(dataset, params, dims)
|
dataset |
A Tx2 or Tx3 matrix of integers, each row corresponding to an event, each integer identifying the participating vertices. |
params |
A list with the following variables:
|
dims |
a vector containing the number of possible actors for each dimension |
probs |
a vector (with an element foreach row in the provided dataset) containing the probability of that event under the model with the provided parameters. |
Christopher DuBois (<email: duboisc@ics.uci.edu>)
Christopher DuBois and Padhraic Smyth. Modeling Relational Events via Latent Classes. Proceedings of the 16th ACM SIGKDD, 2010.
mpmm.cgs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(enron)
dataset <- as.matrix(enron[,2:3])
N <- max(dataset)
dims <- c(N,N)
C <- 5
priors <- list(pi=1,phi=list(1/N,1/N))
fit <- mpmm.cgs(dataset,C,dims,priors,niter=50)
# Compute probability of edge (1,2) occurring under model
newdata <- matrix(c(1,2),1,2)
mpmm.predict(newdata,fit$params,dims)
# Compute loglikelihood of observed data
llk <- sum(log(mpmm.predict(dataset,fit$params,dims)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.