Alt: Alternating optimization of the weighted classification loss

Description Usage Arguments Value References Examples

View source: R/signT.R

Description

Optimize the weighted classification loss given a weight tensor, an observed data tensor, and a large margin loss.

Usage

1
Alt(Ybar,W,r,type = c("logistic","hinge"),start = "random")

Arguments

Ybar

A given data tensor (possibly noisy and incomplete).

W

A weight tensor of the weighted classification loss.

r

A rank to be fitted.

type

A large margin loss to be used. Logistic or hinge loss is available.

start

Choice of initialization method. Use random initialization if start = "random", the initialization based on low rank approximation if start = "linear".

Value

The returned value is a list with components.

binary_obj A series of binary loss values at each iteration.

obj A series of the weighted classification loss values at each iteration.

iter The number of iterations.

error A series of errors at each iteration.

fitted A tensor that optimizes the weighted classification loss.

References

Lee, C., & Wang, M. (2021). Beyond the Signs: Nonparametric Tensor Completion via Sign Series. arXiv preprint arXiv:2102.00384.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(rTensor)
indices = c(2,3,4)
noise = rand_tensor(indices)@data
Theta = array(runif(prod(indices),min=-3,max = 3),indices)

# The signal plus noise model
Y = Theta + noise

# Optimize the weighted classification for a given sign tensor sign(Y) and a weight tensor abs(Y)
result = Alt(sign(Y),abs(Y),r = 2,type = "logistic",start = "random")
signTheta = sign(result$fitted)

Chanwoost/tensorsign documentation built on Feb. 3, 2021, 12:01 a.m.