Learn R Programming

MultiwayRegression (version 1.2)

MultiwayRegression-package: Perform tensor-on-tensor regression

Description

Functions to predict one multi-way array (i.e., a tensor) from another multi-way array, using a low-rank CANDECOMP/PARAFAC (CP) factorization and a ridge (L_2) penalty. Also includes functions to sample from the Bayesian posterior of a tensor-on-tensor model.

Arguments

Details

Package: MultiwayRegression-package
Type: Package
Version: 1.2
Date: 2019-05-28
License: GPL-3

References

Lock, E. F. (2018). Tensor-on-tensor regression. Journal of Computational and Graphical Statistics, 27 (3): 638-647, 2018.

Examples

Run this code
# NOT RUN {
data(SimData) ##loads simulated X: 100 x 15 x 20 and Y: 100 x 5 x 10 
Results <- rrr(X,Y,R=2)  ##Fit rank 2 model with no regularization
Y_pred <- ctprod(X,Results$B,2)  ##Array of fitted values
# }

Run the code above in your browser using DataLab