  Molecular hydrogen being unobservable in cold molecular clouds, the column
density measurements of molecular gas currently rely either on dust emission
observation in the far-IR or on star counting. (Sub-)millimeter observations of
numerous trace molecules are effective from ground based telescopes, but the
relationships between the emission of one molecular line and the H2 column
density (NH2) is non-linear and sensitive to excitation conditions, optical
depths, abundance variations due to the underlying physico-chemistry. We aim to
use multi-molecule line emission to infer NH2 from radio observations. We
propose a data-driven approach to determine NH2 from radio molecular line
observations. We use supervised machine learning methods (Random Forests) on
wide-field hyperspectral IRAM-30m observations of the Orion B molecular cloud
to train a predictor of NH2, using a limited set of molecular lines as input,
and the Herschel-based dust-derived NH2 as ground truth output. For conditions
similar to the Orion B molecular cloud, we obtain predictions of NH2 within a
typical factor of 1.2 from the Herschel-based estimates. An analysis of the
contributions of the different lines to the predictions show that the most
important lines are $^{13}$CO(1-0), $^{12}$CO(1-0), C$^{18}$O(1-0), and
HCO$^+$(1-0). A detailed analysis distinguishing between diffuse, translucent,
filamentary, and dense core conditions show that the importance of these four
lines depends on the regime, and that it is recommended to add the
N$_2$H$^+$(1-0) and CH$_3$OH(20-10) lines for the prediction of NH2 in dense
core conditions. This article opens a promising avenue to directly infer
important physical parameters from the molecular line emission in the
millimeter domain. The next step will be to try to infer several parameters
simultaneously (e.g., NH2 and far-UV illumination field) to further test the
method. [Abridged]
