Hi, I'm using sklearn.decomposition.NMF to deconvolute a series of Raman spectra (n_features >> n_samples) into a small number of components and a mixing matrix. NMF seems to be very well suited for this task, since it yields positive components that can be physically interpreted as partial spectra, and a positive mixing matrix. A small sparsity constraint (typically beta=1e-5) is enforced on components to have cleaner partial spectra. The typical call looks like this:
>>> nmf = sklearn.decomposition.NMF(n_components=n_components, init='nndsvda', sparseness='components', max_iter=1500, beta=1e-5, tol=1e-5) >>> mix = nmf.fit_transform(spectra) >>> components = nmf.components_ The number of components is determined using sklearn.decomposition.PCA, combined with the classic Malinowski indicator function. This gives a slightly overestimated number of components, which I thought would give some room for NMF to work properly. Indeed, some of the components are completely null. When NMF.n_components is increased manually, the shape of some components varies, though NMF.reconstruction_err_ does not change much. Upon serious increase of n_components, some components may even be "merged". This is a serious problem because it jeopardizes the physical interpretation of the components as partial spectra. Should n_components and beta be balanced to avoid this? Or should I tinker with eta? I get the feeling that sparsity has a different enforcement depending on the excess number of components allowed, but I'm not sure how this works. Thank you, William Woelffel ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general