greedy: Factor Loading Adaptive Shrinkage (K factors version)

Description Usage Arguments Details Value Examples

View source: R/flash_v_K.R

Description

flash provide rank K matrix decomposition with greedy algorithm

Usage

1
greedy(Y, K)

Arguments

Y

is the data matrix (N by P)

K

is the max number of factor user want. the output will provide the actual number of factor automaticaly.

Details

greedy algorithm on the residual matrix to get a rank one matrix decomposition

Value

list of factor, loading and variance of noise matrix

Examples

1
2
3
4
N = 100
P = 200
Y = matrix(rnorm(N*P,0,1),ncol=P)
g = greedy(Y,10)

NKweiwang/flash documentation built on May 7, 2019, 6:02 p.m.