Description Usage Arguments Value Methods (by generic) See Also
The NMF package defines methods for the generic deviance
from the package stats
,
to compute approximation errors between NMF models and matrices, using a variety of
objective functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | deviance(object, ...)
## S4 method for signature 'NMF'
deviance(object, y, method = c("", "KL", "euclidean"), ...)
nmfDistance(method = c("", "KL", "euclidean"))
## S4 method for signature 'NMFfit'
deviance(object, y, method, ...)
## S4 method for signature 'NMFfitX'
deviance(object, ...)
## S4 method for signature 'NMFStrategy'
deviance(object, x, y, ...)
|
object |
an object that inherit from NMF. |
... |
extra parameters passed to the objective function. |
y |
a matrix compatible with the NMF model |
method |
a character string or a function with signature
|
x |
an NMF model that estimates |
deviance
returns a nonnegative numerical value
nmfDistance
returns a function with least two arguments:
an NMF model and a matrix.
deviance(object = NMF)
: Computes the distance between a matrix and the estimate of an NMF
model.
deviance(object = NMFfit)
: Returns the deviance of a fitted NMF model.
This method returns the final residual value if the target matrix y
is
not supplied, or the approximation error between the fitted NMF model stored
in object
and y
.
In this case, the computation is performed using the objective function
method
if not missing, or the objective of the algorithm that
fitted the model (stored in slot 'distance'
).
If not computed by the NMF algorithm itself, the value is automatically
computed at the end of the fitting process by the function nmf
,
using the objective function associated with the NMF algorithm, so that it
should always be available.
deviance(object = NMFfitX)
: Returns the deviance achieved by the best fit object, i.e. the lowest
deviance achieved across all NMF runs.
deviance(object = NMFStrategy)
: Computes the value of the objective function between the estimate x
and the target y
, using the objective function associated with the given
NMFStrategy
object.
Other stats:
residuals()
Other stats:
residuals()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.