nmf_update.KL.w
and nmf_update.KL.h
compute
the updated basis and coefficient matrices respectively.
They use a C++ implementation which is optimised
for speed and memory usage.
nmf_update.KL.w_R
and nmf_update.KL.h_R
implement the same updates in plain R.
nmf_update.KL.h(v, w, h, nbterms = 0L, ncterms = 0L, copy = TRUE)
nmf_update.KL.h_R(v, w, h, wh = NULL)
nmf_update.KL.w(v, w, h, nbterms = 0L, ncterms = 0L, copy = TRUE)
nmf_update.KL.w_R(v, w, h, wh = NULL)
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 H_{kj} \frac{\left( sum_i
\frac{W_{ik} V_{ij}}{(WH)_{ij}} \right)}{ sum_i W_{ik} }.
$$ These updates are used in built-in NMF algorithms
KL
and
brunet
.
The basis matrix (W
) is updated as follows: $$
W_{ik} \leftarrow W_{ik} \frac{ sum_j [\frac{H_{kj}
A_{ij}}{(WH)_{ij}} ] }{sum_j H_{kj} } $$