## S3 method for class 'NMFns':
fitted(object, W, H, S, ...)
## S3 method for class 'NMFns':
smoothing(x, theta)NMFnsNMFnsmatrix of basis vectors, i.e. the first matrix factor in
the non-smooth NMF model.matrix of mixture coefficients, i.e. the third matrix factor
the non-smooth NMF model.matrix, i.e. the middle matrix factor in
the non-smooth NMF model.numericsmoothing. So typically
used to pass a value for theta.NMFns can be created using the standard way with
operator new
However, as for all the classes that extend class NMFstd ,
objects of class NMFns should be created using factory method
newNMF :
new('NMFns', theta=0.8)
newNMF(model='NMFns')
newNMF(model='NMFns', theta=0.8)
See newNMF for more details on how to use the factory method."NMF ", directly.NMF ).
Given a non-negative $n \times p$ matrix $V$ and a factorization rank
$r$, it fits the following model:
$$V \equiv W S(\theta) H,$$
where:
NMF , nmf-methods# create a completely empty NMF object
new('NMFns')
# create a NMF object based on random (compatible) matrices
n <- 50; r <- 3; p <- 20
w <- matrix(runif(n*r), n, r)
h <- matrix(runif(r*p), r, p)
newNMF(model='NMFns', W=w, H=h)
# apply Nonsmooth NMF algorithm to a random target matrix
V <- matrix(runif(n*p), n, p)
nmf(V, r, 'ns')Run the code above in your browser using DataLab