The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

TensorMCMC

TensorMCMC implements low-rank tensor regression for tensor predictors and scalar covariates using simple stochastic updates. It includes fast C++ routines for coefficient updates and prediction, and provides tools for cross-validation and error evaluation.

Installation

You can install the development version of TensorMCMC like so:

# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?

install.packages("devtools") 
devtools::install_github("Ritwick2012/TensorMCMC")

Example

This is a basic example which shows you how to solve a common problem:

library(TensorMCMC)
## basic example code

x.train <- array(rnorm(n*p*d), dim = c(n, p, d))
z.train <- matrix(rnorm(n*pgamma), n, pgamma)
y.train <- rnorm(n)

## Fit the tensor regression model
fit <- fit_tensor(x.train, z.train, y.train, rank = 2, nsweep = 50)

# Predict on training data
pred <- predict_tensor_reg(fit, x.train, z.train)

# Calculating RMSE
rmse_val <- rmse(pred, y.train)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.