Self-Tuning Data Adaptive Matrix Imputation

Implements the AdaptiveImpute matrix completion algorithm of 'Intelligent Initialization and Adaptive Thresholding for Iterative Matrix Completion' as well as the specialized variant of 'Co-Factor Analysis of Citation Networks' . AdaptiveImpute is useful for embedding sparsely observed matrices, often out performs competing matrix completion algorithms, and self-tunes its hyperparameter, making usage easy.


fastadi

R-CMD-check Codecov testcoverage

fastadi implements the AdaptiveImpute matrix completion algorithm. fastadi is a self-tuning alternative to algorithms such as SoftImpute (implemented in the softImpute package), truncated SVD, maximum margin matrix factorization, and weighted regularized matrix factorization (implemented in the rsparse package). In simulations fastadi often outperforms softImpute by a small margin.

You may find fastadi useful if you are developing embeddings for sparsely observed data, if you are working in natural language processing, or building a recommendation system.

Installation

You can install the released version from CRAN with:

install.packages("fastadi")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("RoheLab/fastadi")

Example usage

Here we embed users and items in the MovieLens 100K dataset.

library(fastadi)
#> Loading required package: LRMF3
#> Loading required package: Matrix

mf <- adaptive_impute(ml100k, rank = 3L, max_iter = 5L)
#> Warning: 
#> Reached maximum allowed iterations. Returning early.
mf
#> 
#> Adaptively Imputed Low Rank Matrix Factorization
#> ------------------------------------------------
#> 
#> Rank: 3
#> 
#> Rows: 943
#> Cols: 1682
#> 
#> d[rank]: 467.486
#> alpha:   144.663
#> 
#> Components
#> 
#> u: 943 x 3 [matrix] 
#> d: 3      [numeric] 
#> v: 1682 x 3 [matrix]

Note that the vignettes are currently scratch work for reference by the developers and are not yet ready for general consumption.

References

  1. Hayes, Alex, and Karl Rohe. “Co-Factor Analysis of Citation Networks.” Journal of Computational and Graphical Statistics, October 1, 2024, 1–14. https://doi.org/10.1080/10618600.2024.2394464.

  2. Cho, Juhee, Donggyu Kim, and Karl Rohe. “Asymptotic Theory for Estimating the Singular Vectors and Values of a Partially-Observed Low Rank Matrix with Noise.” Statistica Sinica, 2018. https://doi.org/10.5705/ss.202016.0205.

  3. ———. “Intelligent Initialization and Adaptive Thresholding for Iterative Matrix Completion: Some Statistical and Algorithmic Theory for Adaptive-Impute.” Journal of Computational and Graphical Statistics 28, no. 2 (April 3, 2019): 323–33. https://doi.org/10.1080/10618600.2018.1518238.

  4. Mazumder, Rahul, Trevor Hastie, and Robert Tibshirani. “Spectral Regularization Algorithms for Learning Large Incomplete Matrices.” Journal of Machine Learning Research, 2010. https://web.stanford.edu/~hastie/Papers/mazumder10a.pdf.

You can find the original implementation accompanying [2] and [3] here.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("fastadi")

0.1.2 by Alex Hayes, a year ago


https://rohelab.github.io/fastadi/, https://github.com/RoheLab/fastadi


Report a bug at https://github.com/RoheLab/fastadi/issues


Browse source code at https://github.com/cran/fastadi


Authors: Alex Hayes [aut, cre, cph] (ORCID: , Juhee Cho [aut] , Donggyu Kim [aut] , Karl Rohe [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports glue, logger, methods, Rcpp, rlang, RSpectra

Depends on LRMF3, Matrix

Suggests invertiforms, covr, knitr, rmarkdown, testthat

Linking to Rcpp, RcppArmadillo


See at CRAN