biSoftK: NIPALS algorithm with soft thresholding operator on rows and...

Description Usage Arguments Details Value Author(s) See Also

Description

An internal function called by mbpca.

Usage

1
biSoftK(x, maxiter, kp, kt, weight.p, weight.t, pos = FALSE, unit.pb = TRUE, unit.tb = FALSE)

Arguments

x

The input matrix, rows are observations, columns are variables

maxiter

Number of maximum interation the algorithm can run

kp

The number (>=1) or proportion (<1) of variables want to keep. It could be a single value or a vector has the same length as x so the sparsity of individual matrix could be different.

kt

The number (>=1) or proportion (<1) of non-zero scores for obvservations.

weight.p

The weight of variables. It could be 1) a vector has the same length as x, one value for each table/block; 2) one number, all variables share the same weight or 3) a list of vectors, the length of each vector should be the same with the columns numbers of the corresponding table/block, so every variables has a unique weight.

weight.t

The weight for observation. For accepted values or formats, see weight.p.

pos

Logical value, if only non-negaitve values in the loading and score vectors.

unit.pb

Logical value, whether the length of table/block loading should be unit length.

unit.tb

Logical value, whether the length of table/block score should be unit length.

Details

This function also use the NIPALS algorithm, but it generalized nipalsSoftK from several aspects: 1. Allowing sparsity on both columns and rows of matrices 2. Allowing weights for columns and rows 3. Allowing loading and/or score vectors of blocks to be unit length 4. Allowing only positive number in loading and score vectors

Value

an list object contains the following elements:

tb - the block scores

pb - the block loadings

t - the global scores

w - the wegihts of block scores to construct the global score.

Author(s)

Chen Meng

See Also

msvd


mogsa documentation built on Nov. 8, 2020, 5:41 p.m.