getOrder3Tensor {tensorsparse} | R Documentation |
Generate a random order-3 tensor
Description
Generate an order-3 random tensor based on tensor block model.
Usage
getOrder3Tensor(
n,
p,
q,
k = NULL,
r = NULL,
l = NULL,
error = 3,
sort = TRUE,
sparse.percent = 0,
center = FALSE,
seed = NULL,
mumin = -3,
mumax = 3
)
Arguments
n |
the dimension at mode 1 |
p |
the dimension at mode 2 |
q |
the dimension at mode 3 |
k |
an positive integer, the numbers of clusters at mode 1 |
r |
an positive integer, the numbers of clusters at mode 2 |
l |
an positive integer, the numbers of clusters at mode 3 |
error |
a positive numeric value, noise level |
sort |
if TRUE, the tensor entries belonging to the same cluster would be assumed together |
sparse.percent |
the proportion of zero entries based on the Gaussian tensor block model |
center |
if True, the data tensor would be centered to zero-mean before clustering |
seed |
a positive integer, used to specify the random seed |
mumin |
a numeric value, the lower bound of the block mean |
mumax |
a numeric value, the upper bound of the block mean |
Value
a list
x
the tensor
truthX
the underlying signal tensor following block model
truthCs
true cluster label assignment at mode 1
truthDs
true cluster label assignment at mode 2
truthEs
true cluster label assignment at mode 3
mus
the block means
binaryX
the 0-1 tensor (0:the mean signal = 0; 1:the mean signal != 0)
Examples
getOrder3Tensor(20,20,20,2,2,2)$x