simulate.sgdgmf: Simulate method for GMF models

simulate.sgdgmfR 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 sgdgmf

...

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))


sgdGMF documentation built on April 3, 2025, 7:37 p.m.