


brede_nmf_cost_eucl - NMF euclidean cost
function cost = brede_nmf_cost_eucl(A,B);
function cost = brede_nmf_cost_eucl(A,C,D);
Input: A Matrix (target)
B Matrix (model output)
C Factorized matrix
D Factorized matrix
Output: cost Costfunction value
The function computes the euclidean costfunction in connection
with non-negative matrix factorization.
cost = ||A-B||^2
or with A, C and D input arguments:
cost = || A - C*D ||^2
NaN elements are ignored.
If the function is called with 3 arguments and the A matrix is
sparse the the cost is computed iteratively over columns of D
to avoid memory consumption problems.
Ref: DD Lee, HS Seung, Algorithms for Non-negative Matrix
Factorization, 2000, Equation 2.
See also BREDE, BREDE_MAT, BREDE_NMF_COST_DIV, BREDE_NMF_EST.
$Id: brede_nmf_cost_eucl.m,v 1.4 2006/04/24 15:22:16 fn Exp $