  We analyse the correlations between continuum properties and emission line
equivalent widths of star-forming and active galaxies from the Sloan Digital
Sky Survey. Since upcoming large sky surveys will make broad-band observations
only, including strong emission lines into theoretical modelling of spectra
will be essential to estimate physical properties of photometric galaxies. We
show that emission line equivalent widths can be fairly well reconstructed from
the stellar continuum using local multiple linear regression in the continuum
principal component analysis (PCA) space. Line reconstruction is good for
star-forming galaxies and reasonable for galaxies with active nuclei. We
propose a practical method to combine stellar population synthesis models with
empirical modelling of emission lines. The technique will help generate more
accurate model spectra and mock catalogues of galaxies to fit observations of
the new surveys. More accurate modelling of emission lines is also expected to
improve template-based photometric redshift estimation methods. We also show
that, by combining PCA coefficients from the pure continuum and the emission
lines, automatic distinction between hosts of weak active galactic nuclei
(AGNs) and quiescent star-forming galaxies can be made. The classification
method is based on a training set consisting of high-confidence starburst
galaxies and AGNs, and allows for the similar separation of active and
star-forming galaxies as the empirical curve found by Kauffmann et al. We
demonstrate the use of three important machine learning algorithms in the
paper: k-nearest neighbour finding, k-means clustering and support vector
machines.
