fit_ordinal: Main function for parametric tensor estimation and completion...

Description Usage Arguments Value References Examples

View source: R/ordinalT.R

Description

Estimate a signal tensor from a noisy and incomplete ordinal-valued tensor using the cumulative logistic model.

Usage

1
fit_ordinal(ttnsr,r,omega=TRUE,alpha = TRUE)

Arguments

ttnsr

A given (possibly noisy and incomplete) data tensor. The function allows binary- and ordinal-valued tensors. Missing value should be encoded as NA.

r

A rank to be fitted (Tucker rank).

omega

The cut-off points if known,

omega = TRUE if unknown.

alpha

A signal level

alpha = TRUE if the signal level is unknown.

Value

A list containing the following:

C - An estimated core tensor.

A - Estimated factor matrices.

theta - An estimated latent parameter tensor.

iteration - The number of iterations.

cost - Log-likelihood value at each iteration.

omega - Estimated cut-off points.

References

C. Lee and M. Wang. Tensor denoising and completion based on ordinal observations. International Conference on Machine Learning (ICML), 2020.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Latent parameters
library(tensorregress)
alpha = 10
A_1 = matrix(runif(15*2,min=-1,max=1),nrow = 15)
A_2 = matrix(runif(15*2,min=-1,max=1),nrow = 15)
A_3 = matrix(runif(15*2,min=-1,max=1),nrow = 15)
C = as.tensor(array(runif(2^3,min=-1,max=1),dim = c(2,2,2)))
theta = ttm(ttm(ttm(C,A_1,1),A_2,2),A_3,3)@data
theta = alpha*theta/max(abs(theta))
adj = mean(theta)
theta = theta-adj
omega = c(-0.2,0.2)+adj

# Observed tensor
ttnsr <- realization(theta,omega)@data

# Estimation of parameters
ordinal_est = fit_ordinal(ttnsr,c(2,2,2),omega = TRUE,alpha = 10)

TensorComplete documentation built on May 11, 2021, 5:08 p.m.