  Molecular emission from the galactic and extragalactic interstellar medium
(ISM) is often used to determine the physical conditions of the dense gas.
However, even from spatially resolved regions, the observed molecules are not
necessarily arising from a single component. Disentangling multiple gas
components is often a degenerate problem in radiative transfer studies. In this
paper we investigate the use of the non-negative matrix factorization (NMF)
approach as a means to recover gas components from a set of blended line
intensity maps of molecular transitions which may trace different physical
conditions. We run a series of experiments on synthetic datasets designed to
replicate conditions in two very different environments: galactic pre-stellar
cores and the ISM in high redshift galaxies. We find that the NMF algorithm
often recovers the multiple components resembling those used in the
data-generating process, provided that the different components have similar
column densities. When NMF fails to recover all the individual components it
does however group together the most similarly emitting ones. We further found
that initialisation and regularisation are key factors in the efficiency of the
NMF algorithm.
