projFuncPos: Projection of a Vector to a Non-negative Sparse Vector

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/fabia.R

Description

projFuncPos: R implementation of projFuncPos.

Usage

1
projFuncPos(s, k1, k2)

Arguments

s

data vector.

k1

sparseness, l1 norm constraint.

k2

l2 norm constraint.

Details

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

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

non-negative 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

fabia, fabias, fabiap, fabi, fabiasp, mfsc, nmfdiv, nmfeu, nmfsc, extractPlot, extractBic, plotBicluster, Factorization, projFuncPos, projFunc, estimateMode, makeFabiaData, makeFabiaDataBlocks, makeFabiaDataPos, makeFabiaDataBlocksPos, matrixImagePlot, fabiaDemo, fabiaVersion

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#---------------
# DEMO
#---------------

size <- 30
sparseness <- 0.7

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

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

s
ss

fabia documentation built on Nov. 8, 2020, 8:09 p.m.