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 = "linear")

Arguments

Ybar

A given (possibly noisy and incomplete) data tensor.

W

A weight tensor used in the weighted classification loss.

r

Tensor 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"; Use the initialization based on low rank approximation if start = "linear". Linear initialization is default.

Value

The returned object is a list of components.

binary_obj - Trajectory of binary loss values over iterations.

obj - Trajectory of weighted classification loss values over iterations.

iter - The number of iterations.

error - Trajectory of errors over iterations.

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 given a sign tensor sign(Y) and a weight tensor abs(Y)
result = Alt(sign(Y),abs(Y),r = 3,type = "logistic",start = "linear")
signTheta = sign(result$fitted)

tensorsign documentation built on Feb. 8, 2021, 5:06 p.m.