mfsc {fabia} | R Documentation

## Sparse Matrix Factorization for Bicluster Analysis (MFSC)

### Description

`mfsc`: R implementation of `mfsc`.

### Usage

    mfsc(X,p,sL,sZ,cyc=100,norm=1)

### Arguments

`X` | the data matrix.
`p` | number of hidden factors = number of biclusters.
`sL` | sparseness loadings.
`sZ` | sparseness factors.
`cyc` | maximal number of iterations.
`norm` | should the data be standardized, default = 1 (yes, using mean), 2 (yes, using median).

### Details

Biclusters are found by sparse matrix factorization where both factors are sparse.

Essentially the model is the sum of outer products of sparse vectors. The number of summands p is the number of biclusters.

X = L Z

X = sum_{i=1}^{p} L_i (Z_i )^T

No noise assumption: In contrast to factor analysis there is no noise assumption.

If the nonzero components of the sparse vectors are grouped together then the outer product results in a matrix with a nonzero block and zeros elsewhere.

The model selection is performed by a constraint optimization according to Hoyer, 2004. The Euclidean distance (the Frobenius norm) is minimized subject to sparseness constraints.

Model selection is done by gradient descent on the Euclidean objective and thereafter projection of single vectors of L and single vectors of Z to fulfill the sparseness constraints.

The projection minimize the Euclidean distance to the original vector given an l_1-norm and an l_2-norm.

The projection is a convex quadratic problem which is solved iteratively where at each iteration at least one component is set to zero. Instead of the l_1-norm a sparseness measurement is used which relates the l_1-norm to the l_2-norm.

The code is implemented in R.

### Value

`L` | Left matrix: L
`Z` | Right matrix: Z

### Author(s)

Sepp Hochreiter

### References

Patrik O. Hoyer, ‘Non-negative Matrix Factorization with Sparseness Constraints’, Journal of Machine Learning Research 5:1457-1469, 2004.

### See Also

`fabi`, `fabia`, `fabiap`, `fabias`, `fabiasp`, `mfsc`, `nmfdiv`, `nmfeu`, `nprojfunc`, `projfunc`, `make_fabi_data`, `make_fabi_data_blocks`, `make_fabi_data_pos`, `make_fabi_data_blocks_pos`, `extract_plot`, `extract_bic`, `myImagePlot`, `PlotBicluster`, `Breast_A`, `DLBCL_B`, `Multi_A`, `fabiaDemo`, `fabiaVersion`

### Examples

    #---------------
    # TEST
    #---------------

    dat <- make_fabi_data_blocks(n = 100,l= 50,p = 3,f1 = 5,f2 = 5,
      of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0,
      sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0)

    X <- dat[[1]]
    Y <- dat[[2]]
    X <- X- rowMeans(X)
    XX <- (1/ncol(X))*tcrossprod(X)
    dXX <- 1/sqrt(diag(XX)+0.001*as.vector(rep(1,nrow(X))))
    X <- dXX*X

    resEx <- resToy <- mfsc(X,3,0.7,0.7)

    ## Not run:
    #---------------
    # DEMO1
    #---------------

    dat <- make_fabi_data_blocks(n = 1000,l= 100,p = 10,f1 = 5,f2 = 5,
      of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0,
      sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0)

    X <- dat[[1]]
    Y <- dat[[2]]
    X <- X- rowMeans(X)
    XX <- (1/ncol(X))*tcrossprod(X)
    dXX <- 1/sqrt(diag(XX)+0.001*as.vector(rep(1,nrow(X))))
    X <- dXX*X

    resToy <- mfsc(X,13,0.7,0.7)

    rToy <- extract_plot(X,resToy$L,resToy$Z,ti="MFSC",Y=Y)

    #---------------
    # DEMO2
    #---------------

    data(Breast_A)

    X <- as.matrix(XBreast)
    X <- X- rowMeans(X)
    XX <- (1/ncol(X))*tcrossprod(X)
    dXX <- 1/sqrt(diag(XX)+0.001*as.vector(rep(1,nrow(X))))
    X <- dXX*X

    resBreast <- mfsc(X,5,0.7,0.3)

    rBreast <- extract_plot(X,resBreast$L,resBreast$Z,ti="MFSC Breast cancer(Veer)")

    #sorting of predefined labels
    CBreast

    #---------------
    # DEMO3
    #---------------

    data(Multi_A)

    X <- as.matrix(XMulti)
    X <- X- rowMeans(X)
    XX <- (1/ncol(X))*tcrossprod(X)
    dXX <- 1/sqrt(diag(XX)+0.001*as.vector(rep(1,nrow(X))))
    X <- dXX*X

    resMulti <- mfsc(X,5,0.7,0.3)

    rMulti <- extract_plot(X,resMulti$L,resMulti$Z,ti="MFSC Multiple tissues(Su)")

    #sorting of predefined labels
    CMulti

    #---------------
    # DEMO4
    #---------------

    data(DLBCL_B)

    X <- as.matrix(XDLBCL)
    X <- X- rowMeans(X)
    XX <- (1/ncol(X))*tcrossprod(X)
    dXX <- 1/sqrt(diag(XX)+0.001*as.vector(rep(1,nrow(X))))
    X <- dXX*X

    resDLBCL <- mfsc(X,5,0.7,0.3)

    rDLBCL <- extract_plot(X,resDLBCL$L,resDLBCL$Z,ti="MFSC Lymphoma(Rosenwald)")

    #sorting of predefined labels
    CDLBCL

    ## End(Not run)

[Package fabia version 0.1.1 Index]