library(tensorregress)
indices = c(2,2,2)
noise = rand_tensor(indices)@data
Theta = array(runif(prod(indices),min=-1,max = 1),indices)
# The signal plus noise model
Y = Theta + noise
# Estimate Theta from nonparametic completion method via sign series
hatTheta = fit_nonparaT(Y,truer = 1,H = 1,Lmin = -1,Lmax = 1, option =2)
print(hatTheta$est)
Run the code above in your browser using DataLab