I'm using the tensor toolbox and within that the NMF section. I have everything working perfectly except one thing, the initialisation. It uses a struct:
% INIT : A struct containing initial values. INIT.W and INIT.H should contain
% initial values of W and H of size (m x k) and (k x n), respectively.
% When INIT is not given, W and H are randomly initialized.
I can create the 1x1 struct containing INIT.W and INIT.H of the appropriate sizes with no problem. But when I try and call it, I don't seem to be able to do.
The function looks like this within the toolbox looks like this:
So, I thought it should look like this within the line undertaking the NMF:
[W,H,iter,REC]=nmf(data_nmf,k, 'MIN_ITER',500,'tol',1e-7,'method','anls_bpp','init',struct([init.W, init.H]));
I've been reading all the previous questions on structures, read the matlab pages on structures and nmf and tried lots of variations on the above....but I still don't seem to be able to run it.
I'm clearly making a really daft mistake but I just can't see it! If anyone has used this toolbox and this part of it successfully I'd be most grateful to know how you ran the initialisation.