Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modeMean-methods

Tensor Mean Across Single Mode


Description

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

Usage

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

Examples

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

rTensor

Tools for Tensor Analysis and Decomposition

v1.4.8
GPL (>= 2)
Authors
James Li and Jacob Bien and Martin Wells
Initial release
2021-05-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.