projfunc {fabia} | R Documentation

## Projection of a Vector to a Sparse Vector

### Description

`projfunc`: R implementation of `projfunc`.

### Usage

    projfunc(s, k1, k2)

### Arguments

`s` | data vector.
`k1` | sparseness, l1 norm constraint.
`k2` | l2 norm constraint.

### Details

The projection is done according to Hoyer, 2004: given an l_1-norm and an l_2-norm minimize the Euclidean distance to the original vector. The projection is a convex quadratic problem which is solved iteratively where at each iteration at least one component is set to zero.

In the applications, instead of the l_1-norm a sparseness measurement is used which relates the l_1-norm to the l_2-norm.

Implementation in R.

### Value

`v` | sparse projected vector.

### 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`, `nmfsc`, `nprojfunc`, `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

    #---------------
    # DEMO
    #---------------

    size <- 30
    sparseness <- 0.7

    s <- as.vector(rnorm(size))
    sp <- sqrt(1.0*size)-(sqrt(1.0*size)-1.0)*sparseness

    ss <- projfunc(s,k1=sp,k2=1)

    s
    ss

[Package fabia version 0.1.1 Index]