Description Usage Arguments Value Note Examples
Generate a Tensor with specified modes with iid normal(0,1) entries.
1 | rand_tensor(modes = c(3, 4, 5), drop = FALSE)
|
modes |
the modes of the output Tensor |
drop |
whether or not modes equal to 1 should be dropped |
a Tensor object with modes given by modes
Default rand_tensor()
generates a 3-Tensor with modes c(3,4,5)
.
1 2 3 | rand_tensor()
rand_tensor(c(4,4,4))
rand_tensor(c(10,2,1),TRUE)
|
Numeric Tensor of 3 Modes
Modes: 3 4 5
Data:
[1] 0.06365444 -0.32348039 1.62945502 -0.33294478 -1.04150692 -0.14564043
Numeric Tensor of 3 Modes
Modes: 4 4 4
Data:
[1] 0.64781182 -0.12356294 0.53645622 -0.06455466 0.82366317 -0.12685799
Numeric Tensor of 2 Modes
Modes: 10 2
Data:
[,1] [,2]
[1,] -1.9208815 -0.623333518
[2,] 0.6749850 1.185485048
[3,] 0.7634139 -0.208146171
[4,] 0.6241862 0.004529606
[5,] -1.6123300 1.277260224
[6,] -0.9088903 0.377090614
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.