Learn R Programming

nnTensor (version 1.3.0)

kFoldMaskTensor: Mask tensors generator to perform k-fold cross validation

Description

The output multiple mask tensors can be immediately specified as the argument M for NTF() or NTD().

Usage

kFoldMaskTensor(X, k=3, seeds=123, sym=FALSE)

Arguments

X

An rTensor object.

k

Number of split for k-fold cross validation (Default: 3).

seeds

Random seed to use for set.seed() (Default: 123).

sym

Data will be dropped symmetrically (available only when matrix is specified, Default: FALSE).

Author

Koki Tsuyuzaki

Examples

Run this code
tensordata <- toyModel(model = "CP")

str(kFoldMaskTensor(tensordata, k=5))

Run the code above in your browser using DataLab