simulate.sgdgmf {sgdGMF} | R Documentation |
Simulate method for GMF models
Description
Simulate new data from a fitted generalized matrix factorization models
Usage
## S3 method for class 'sgdgmf'
simulate(object, ..., nsim = 1)
Arguments
object |
an object of class |
... |
further arguments passed to or from other methods |
nsim |
number of samples |
Value
An 3-fold array containing the simulated data.
Examples
# 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))
[Package sgdGMF version 1.0.1 Index]