deviance
from the package stats
, to compute
approximation errors between NMF models and matrices,
using a variety of objective functions. nmfDistance
returns a function that computes the
distance between an NMF model and a compatible matrix.
deviance(object, ...) ## S3 method for class 'NMF':
deviance(object, y,
method = c("", "KL", "euclidean"), ...)
nmfDistance(method = c("", "KL", "euclidean"))
## S3 method for class 'NMFfit':
deviance(object, y, method, ...)
## S3 method for class 'NMFStrategy':
deviance(object, x, y, ...)
object
, i.e. y
must have the same dimension
as fitted(object)
.(x="NMF", y="matrix", ...)
that
implements a distance measure between an NMF model
x
and a target matrix y
, i.e. an objective
function to use to compute the devy
.deviance
returns a nonnegative numerical value nmfDistance
returns a function with least two
arguments: an NMF model and a matrix.
deviance,NMF-method
,
hasTrack
, residuals
,
residuals<-
, trackError