Learn R Programming

fabisearch (version 0.0.4.5)

opt.rank: Finds the optimal rank for non-negative matrix factorization (NMF)

Description

This function finds the optimal rank for non-negative matrix factorization (NMF).

Usage

opt.rank(Y, nruns = 50, algtype = "brunet")

Value

A positive integer representing the optimal rank.

Arguments

Y

An input multivariate time series in matrix format, with variables organized in columns and time points in rows. All entries in Y must be positive.

nruns

A positive integer with default value equal to 50. It is used to define the number of runs in the NMF function.

algtype

A character string, which defines the algorithm to be used in the NMF function. By default it is set to "brunet". See the "Algorithms" section of nmf for more information on the available algorithms.

Author

Martin Ondrus, mondrus@ualberta.ca, Ivor Cribben, cribben@ualberta.ca

References

"Factorized Binary Search: a novel technique for change point detection in multivariate high-dimensional time series networks", Ondrus et al. (2021), <arXiv:2103.06347>.

Examples

Run this code
# \donttest{
## Finding the optimal rank for an input data set "sim2" with nruns = 4
set.seed(123)
opt.rank(sim2, nruns = 4)
# [1] "Finding optimal rank"
# [1] "Optimal rank: 2"
# [1] 2
# }

Run the code above in your browser using DataLab