modeMean-methods: Tensor Mean Across Single Mode

Description Usage Arguments Details Value See Also Examples

Description

Given a mode for a K-tensor, this returns the K-1 tensor resulting from taking the mean across that particular mode.

Usage

1
2
3
4
modeMean(tnsr, m, drop)

## S4 method for signature 'Tensor'
modeMean(tnsr, m = NULL, drop = FALSE)

Arguments

tnsr

the Tensor instance

m

the index of the mode to average across

drop

whether or not mode m should be dropped

Details

modeMean(tnsr,m=NULL,drop=FALSE)

Value

K-1 or K Tensor, where K = x@num_modes

See Also

modeSum

Examples

1
2
tnsr <- rand_tensor()
modeMean(tnsr,1,drop=TRUE)

rTensor documentation built on May 15, 2021, 9:06 a.m.