NMFns-class
).fitted(object, ...) ## S3 method for class 'NMFstd':
fitted(object, W, H, ...)
## S3 method for class 'NMFOffset':
fitted(object, W, H,
offset = object@offset)
## S3 method for class 'NMFns':
fitted(object, W, H, S, ...)
NMF
basis(object)
. It must be
compatible with the coefficient matrix used in the
computation (i.e. number of columns in W
= number
of rows in H
).coef(object)
. It
must be compatible with the basis matrix used in the
computation (i.e. number of rows in H
= number of
columns in W
).smoothing(object)
It must be a square matrix
compatible with the basis and coefficient matrices used
in the computation.object
NMF
, meaning that concrete NMF models must provide
a definition for their corresponding class (i.e.
sub-classes of class NMF
). See
NMF
for more details.# random standard NMF model
x <- rnmf(3, 10, 5)
all.equal(fitted(x), basis(x) %*% coef(x))
Run the code above in your browser using DataLab