nmf_update.euclidean.w and
nmf_update.euclidean.h compute the updated basis
and coefficient matrices respectively. They use a
C++ implementation which is optimised for speed
and memory usage.
nmf_update.euclidean.w_R and
nmf_update.euclidean.h_R implement the same
updates in plain R.
nmf_update.euclidean.h(v, w, h, eps = 10^-9, nbterms = 0L, ncterms = 0L, copy = TRUE)
nmf_update.euclidean.h_R(v, w, h, wh = NULL, eps = 10^-9)
nmf_update.euclidean.w(v, w, h, eps = 10^-9, nbterms = 0L, ncterms = 0L, weight = NULL, copy = TRUE)
nmf_update.euclidean.w_R(v, w, h, wh = NULL, eps = 10^-9)v -- and h.FALSE) or
on a copy (TRUE - default). With copy=FALSE
the memory footprint is very small, and some speed-up may
be achieved in the case of big matrices. However, greater
care should be taken due the side effect. We recommend
that only experienced users use copy=TRUE.w or h). If copy=FALSE,
the returned matrix uses the same memory as the input
object.
H) is updated as follows:
$$ H_{kj} \leftarrow \frac{\max(H_{kj} W^T V)_{kj},
\varepsilon) }{(W^T W H)_{kj} + \varepsilon} $$ These updates are used by the built-in NMF algorithms
Frobenius and
lee.
The basis matrix (W) is updated as follows: $$
W_ik \leftarrow \frac{\max(W_ik (V H^T)_ik, \varepsilon)
}{ (W H H^T)_ik + \varepsilon} $$