Learn R Programming

sgdGMF

An R package for efficient estimation of generalized matrix factorization (GMF) models [1,2,3]. The package implements the adaptive stochastic gradient descent with block- and coordinate-wise sub-sampling strategies proposed in [4]. Additionally, sgdGMF implements the alternated iterative re-weighted least squares [1,3] and diagonal-Hessian quasi-Newton [1] algorithms.

References

[1] Collins, M., Dasgupta, S., Schapire, R.E. (2001). A generalization of principal components analysis to the exponential family. Advances in neural information processing systems, 14.

[2] Kidzinski, L., Hui, F.K.C., Warton, D.I., Hastie, T.J. (2022). Generalized Matrix Factorization: efficient algorithms for fitting generalized linear latent variable models to large data arrays. Journal of Machine Learning Research, 23(291): 1--29.

[3] Wang, L., Carvalho, L. (2023). Deviance matrix factorization. Electronic Journal of Statistics, 17(2): 3762--3810.

[4] Castiglione, C., Segers, A., Clement, L, Risso, D. (2024). Stochastic gradient descent estimation of generalized matrix factorization models with application to single-cell RNA sequencing data. arXiv preprint: arXiv:2412.20509.

Copy Link

Version

Install

install.packages('sgdGMF')

Monthly Downloads

306

Version

1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Cristian Castiglione

Last Published

February 13th, 2025

Functions in sgdGMF (1.0)

norm.procrustes

Procrustes distance
image.initgmf

Heatmap of an initialized GMF model
matrix.deviance

Model deviance of a GMF model
matrix.penalty

Frobenius penalty for the parameters of a GMF model
plot.initgmf

Plot diagnostics for an initialized GMF model
fitted.initgmf

Extract the fitted values of an initialized GMF model
residuals.initgmf

Extract the residuals of an initialized GMF model
partition

Split the data matrix in train and test sets
eigengap.onatski

Rank selection via the Onatski method
image.sgdgmf

Heatmap of a GMF model
print.sgdgmf

Print the fundamental characteristics of a GMF
make.pos.diag

Fix sign ambiguity of eigen-vectors
eigengap.oht

Rank selection via optimal hard thresholding
refit.sgdgmf

Refine the final estimate of a GMF model
reexports

Objects exported from other packages
cpp.fit.newton

Fit a GMF model using the diagonal quasi-Newton algorithm
procrustes

Procrustes rotation of two configurations
set.control.airwls

Check and set the control parameters for the AIRWLS algorithm
set.control.alg

Check and set the control parameters for the select optimization algorithm
normalize.uv

Normalize the matrices U and V
cpp.fit.random.block.sgd

Fit a GMF model using the adaptive SGD with block-wise minibatch subsampling
set.control.cv

Check and set the cross-validation parameters
residuals.sgdgmf

Extract the residuals of a GMF model
set.control.coord.sgd

Check and set the control parameters for the coordinate-SGD algorithm
set.control.block.sgd

Check and set the control parameters for the blockwise-SGD algorithm
set.mat.weights

Check and set the weighting matrix
set.control.init

Check and set the initialization parameters for a GMF model
plot.sgdgmf

Plot diagnostics for a GMF model
omp.check

Check if OpenMP is enabled
set.penalty

Check and set the penalty parameters
set.mat.Y

Check and set the response matrix Y
set.mat.X

Check and set the covariate matrix X
sgdGMF-package

sgdGMF: Estimation of Generalized Matrix Factorization Models via Stochastic Gradient Descent
ols.fit.coef

Estimate the coefficients of a multivariate linear model
pointwise.deviance

Pointwise deviance of a GMF model
set.control.newton

Check and set the control parameters for the Newton algorithm
predict.sgdgmf

Predict method for GMF models
print.initgmf

Print the fundamental characteristics of an initialized GMF
screeplot.initgmf

Screeplot for the residuals of an initialized GMF model
sgdgmf.rank

Rank selection via eigenvalue-gap methods
simulate.sgdgmf

Simulate method for GMF models
screeplot.sgdgmf

Screeplot for the residuals of a GMF model
sgdgmf.cv

Model selection via cross-validation for generalized matrix factorization models
sgdgmf.fit

Factorize a matrix of non-Gaussian observations using GMF
sgdgmf.cv.step

Single step of cross-validation for generalized matrix factorization models
whitening.matrix

Compute the whitening matrix from a given covariance matrix
set.family

Check and set the model family
sgdgmf.init

Initialize the parameters of a generalized matrix factorization model
sim.gmf.data

Simulate non-Gaussian data from a GMF model
simulate

Simulate new data
set.mat.Z

Check and set the covariate matrix X
set.mat.offset

Check and set the offset matrix
vglm.fit.coef

Estimate the coefficients of a vector generalized linear model
cpp.fit.block.sgd

Fit a GMF model using the adaptive SGD with block-wise minibatch subsampling
biplot.initgmf

Biplot of an initialized GMF model
coefficients.sgdgmf

Extract the coefficient of a GMF model
coefficients.initgmf

Extract the coefficient of an initialized GMF model
biplot.sgdgmf

Biplot of a GMF model
fitted.sgdgmf

Extract the fitted values of a GMF models
deviance.sgdgmf

Compute deviance, AIC and BIC of a GMF model
deviance.initgmf

Compute deviance, AIC and BIC of an initialized GMF model
cpp.fit.coord.sgd

Fit a GMF model using the adaptive SGD with coordinate-wise minibatch subsampling algorithm
cpp.fit.airwls

Fit a GMF model using the AIRWLS algorithm
cpp.airwls.update

AIRWLS update for GMF models
cpp.airwls.glmstep

Compute one Fisher scoring step for GLMs
cpp.airwls.glmfit

Fisher scoring algorithm for GLMs
eigengap.act

Rank selection via adjust correlation thresholding