Description Usage Format Members Methods Examples
Tucker_model
objects are 'R6' objects so that their values can be updated in place.
The object is treated like an environment and components are accessed using the $
operator.
When creating a new Tucker_model object it will be populated with default values and empty matrices.
To initialize a Tucker_model
call the initialize()
method.
1 |
An R6Class
generator object
Integer showing the number of iterations that have been run on this object.
Stop if the lower bound increases by less than this value.
Vector storing the lower bound values during training.
Vector of the root mean squared error of the predictions during training.
vector of the root mean squared error of predictions made by multiplying the H matrices.
Vector of the explained variance of predictions during training.
Vector of the Pearson correlation of predictions during training.
Vector of the Spearman correlation of predictions during training.
Vector of the time taken for each update iteration.
Mean parameters of the q Gaussian distributions in the core tensor.
Variance parameters of the q Gaussian distributions in the core tensor.
Prior for the shape parameter of the gamma distribution on the core precision.
Prior for the scale parameter of the gamma distribution on the core precision.
array storing the predicted response tensor.
binary array indicating whether the response is observed.
variance parameters of the q Gaussian distributions in the core tensor.
Product of mode1.X with itself stored to avoid recalculating.
Product of mode2.X with itself stored to avoid recalculating.
Product of mode3.X with itself stored to avoid recalculating.
Matrix storing the shape parameters for the gamma distributions on the mode 1 projection (A) matrix.
Matrix storing the scale parameters for the gamma distributions on the mode 1 projection (A) matrix.
Matrix storing the shape parameters for the gamma distributions on the mode 2 projection (A) matrix.
Matrix storing the scale parameters for the gamma distributions on the mode 2 projection (A) matrix.
Matrix storing the shape parameters for the gamma distributions on the mode 3 projection (A) matrix.
Matrix storing the scale parameters for the gamma distributions on the mode 3 projection (A) matrix.
Matrix storing the mean parameters for the normal distributions on the mode 1 projection (A) matrix.
Array storing the covariance parameters for the normal distributions on the mode 1 projection (A) matrix.
Matrix storing the mean parameters for the normal distributions on the mode 2 projection (A) matrix.
Array storing the covariance parameters for the normal distributions on the mode 2 projection (A) matrix.
Matrix storing the mean parameters for the normal distributions on the mode 3 projection (A) matrix.
Array storing the covariance parameters for the normal distributions on the mode 3 projection (A) matrix.
Matrix storing the mean parameters for the normal distributions on the mode 1 latent (H) matrix.
Matrix storing the variance parameters for the normal distributions on the mode 1 latent (H) matrix.
Matrix storing the mean parameters for the normal distributions on the mode 2 latent (H) matrix.
Matrix storing the variance parameters for the normal distributions on the mode 2 latent (H) matrix.
Matrix storing the mean parameters for the normal distributions on the mode 3 latent (H) matrix.
Matrix storing the variance parameters for the normal distributions on the mode 3 latent (H) matrix.
Variance for the response tensor.
Variance for the mode 1 latent (H) matrix.
Variance for the mode 2 latent (H) matrix.
Variance for the mode 3 latent (H) matrix.
Prior shape parameter for the gamma distribution on the precision of the mode 1 projection (A) matrix.
Prior scale paramet for the gamma distribution on the precision of the mode 1 projection (A) matrix.
Prior shape parameter for the gamma distribution on the precision of the mode 2 projection (A) matrix.
Prior scale paramet for the gamma distribution on the precision of the mode 2 projection (A) matrix.
Prior shape parameter for the gamma distribution on the precision of the mode 3 projection (A) matrix.
Prior scale paramet for the gamma distribution on the precision of the mode 3 projection (A) matrix.
Prior shape parameter for the gamma distribution on the precision of the core tensor.
Prior scale parameter for the gamma distribution on the precision of the core tensor.
Prior shape parameter for the gamma distribution on the precision of the 0D subset of the core tensor.
Prior scale parameter for the gamma distribution on the precision of the 0D subset of the core tensor.
Prior shape parameter for the gamma distribution on the precision of the 1D subset of the core tensor.
Prior scale parameter for the gamma distribution on the precision of the 1D subset of the core tensor.
Prior shape parameter for the gamma distribution on the precision of the 2D subset of the core tensor.
Prior scale parameter for the gamma distribution on the precision of the 2D subset of the core tensor.
Prior shape parameter for the gamma distribution on the precision of the 3D subset of the core tensor.
Prior scale parameter for the gamma distribution on the precision of the 3D subset of the core tensor.
new(data, params)
Creates a new Tucker_model
object with
matrices sized accoring to the matrices in data
.
rand_init(params)
Initializes the Tucker_model
with
random values accoring to params
.
1 2 3 4 5 6 7 8 9 | data.params <- get_data_params(c('decomp=Tucker'))
toy <- mk_toy(data.params)
train.data <- input_data$new(mode1.X=toy$mode1.X[,-1],
mode2.X=toy$mode2.X[,-1],
mode3.X=toy$mode3.X[,-1],
resp=toy$resp)
model.params <- get_model_params(c('decomp=Tucker'))
toy.model <- mk_model(train.data, model.params)
toy.model$rand_init(model.params)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.