  We present a new approach based on Supervised Machine Learning (SML)
algorithms to infer key physical properties of galaxies (density, metallicity,
column density and ionization parameter) from their emission line spectra. We
introduce a numerical code (called GAME, GAlaxy Machine learning for Emission
lines) implementing this method and test it extensively. GAME delivers
excellent predictive performances, especially for estimates of metallicity and
column densities. We compare GAME with the most widely used diagnostics (e.g.
R$_{23}$, [NII]$\lambda$6584 / H$\alpha$ indicators) showing that it provides
much better accuracy and wider applicability range. GAME is particularly
suitable for use in combination with Integral Field Unit (IFU) spectroscopy,
both for rest-frame optical/UV nebular lines and far-infrared/sub-mm lines
arising from Photo-Dissociation Regions. Finally, GAME can also be applied to
the analysis of synthetic galaxy maps built from numerical simulations.
