NMF
API/Reference
ADI.NMF
— TypeNMF(;ncomps=nothing)
NMF(ncomps)
Use non-negative matrix factorization (NMF, NNMF) to form a non-negative, low-rank, and orthonormal basis of the input. The implementation of the underlying NMF is provided by NMF.jl. The implementation uses a non-negative SVD for initialization and a coordinate-descent solver to fit.
If ncomps
is nothing
, it will be set to the number of frames in the reference cube when processed.
NMF is not designed to fit negative values. This algorithm will warn you (but will not error) if a target or reference cube contains negative values. The output may seem reasonable, but it is not well-defined with respect to the NMF algorithm. To overcome this, rescaling the data by its minimum before processing is necessary
target = cube .- minimum(cube)
S = reconstruct(NMF(), target, angles)
When doing full-frame reduction (e.g. NMF()(cube, angles)
) this is handled automatically, so this constraint only applies to the lower-level API and methods which rely on those, such as GreeDS
. In general, if you see warnings, heed them.
References
- Ren et al. 2018 Non-negative Matrix Factorization: Robust Extraction of Extended Structures