Description Usage Arguments Value References Examples
Optimize the weighted classification loss given a weight tensor, an observed data tensor, and a large margin loss.
1 |
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 |
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.
Lee, C., & Wang, M. (2021). Beyond the Signs: Nonparametric Tensor Completion via Sign Series. arXiv preprint arXiv:2102.00384.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.