simulate.sgdgmf | R Documentation |
Simulate new data from a fitted generalized matrix factorization models
## S3 method for class 'sgdgmf'
simulate(object, ..., nsim = 1)
object |
an object of class |
... |
further arguments passed to or from other methods |
nsim |
number of samples |
An 3-fold array containing the simulated data.
# Load the sgdGMF package
library(sgdGMF)
# Generate data from a Poisson model
data = sim.gmf.data(n = 100, m = 20, ncomp = 5, family = poisson())
# Fit a GMF model
gmf = sgdgmf.fit(data$Y, ncomp = 3, family = poisson())
# Simulate new data from a GMF model
str(simulate(gmf))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.